Trait MapSize

Source
pub trait MapSize {
    type Output;

    // Required method
    fn map_size() -> Vec2D<Self::Output>;
}
Expand description

A trait providing a method to define the size of a 2D map.

This is used to determine the dimensions of the map for wrapping operations.

Required Associated Types§

Source

type Output

The output type of the map dimensions.

Required Methods§

Source

fn map_size() -> Vec2D<Self::Output>

Returns the size of the map as a Vec2D object.

§Returns

A Vec2D representing the width (x) and height (y) of the map.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MapSize for f64

Source§

fn map_size() -> Vec2D<f64>

Defines the size of the map as a Vec2D with dimensions 21600.0 x 10800.0.

§Returns

A Vec2D with floating-point components representing the map dimensions.

Source§

type Output = f64

Source§

impl MapSize for i32

Implementation of the MapSize trait for the i32 type.

Source§

fn map_size() -> Vec2D<i32>

Defines the size of the map as a Vec2D with dimensions 21600 x 10800.

§Returns

A Vec2D with signed 32-bit integer components representing the map dimensions.

Source§

type Output = i32

Source§

impl MapSize for u32

Implementation of the MapSize trait for the u32 type.

Source§

fn map_size() -> Vec2D<u32>

Defines the size of the map as a Vec2D with dimensions 21600 x 10800.

§Returns

A Vec2D with unsigned 32-bit integer components representing the map dimensions.

Source§

type Output = u32

Source§

impl MapSize for I32F0

Implementation of the MapSize trait for the I32F0 fixed-point number type.

Source§

fn map_size() -> Vec2D<I32F0>

Defines the size of the map as a Vec2D with dimensions 21600 x 10800.

§Returns

A Vec2D with fixed-point integer components representing the map dimensions.

Source§

type Output = FixedI32<UTerm>

Source§

impl MapSize for I32F32

Implementation of the MapSize trait for the I32F32 fixed-point number type.

Source§

fn map_size() -> Vec2D<I32F32>

Defines the size of the map as a Vec2D with dimensions 21600.0 x 10800.0.

§Returns

A Vec2D with fixed-point components representing the map dimensions.

Source§

type Output = FixedI64<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>

Source§

impl MapSize for I96F32

Implementation of the MapSize trait for the I96F32 fixed-point number type.

Source§

fn map_size() -> Vec2D<I96F32>

Defines the size of the map as a Vec2D with dimensions 21600.0 x 10800.0.

§Returns

A Vec2D with fixed-point components representing the map dimensions.

Source§

type Output = FixedI128<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>

Implementors§

Source§

impl<T> MapSize for Vec2D<T>
where T: MapSize<Output = T>,

Implementation of the MapSize trait for a Vec2D type with components that also implement the MapSize trait.