Struct mutils::Vec2D [−][src]
pub struct Vec2D<V: Copy> { /* fields omitted */ }
Expand description
Holds the data for a Vec2D.
A Vec2D has a fixed size and cannot be resized.
Implementations
Creates a new Vec2D of the size given.
It is filled with the default value.
In Debug mode this will panic! if it is given a vector with different shaped arrays.
Returns the size of this Vec2D as a Rect. This is for convenience, as the bottom left corner is always Point(0, 0).
pub fn iter(&self) -> Vec2DIterator<'_, V>ⓘNotable traits for Vec2DIterator<'a, V>
impl<'a, V: Copy> Iterator for Vec2DIterator<'a, V> type Item = (V, Point<usize>);
pub fn iter(&self) -> Vec2DIterator<'_, V>ⓘNotable traits for Vec2DIterator<'a, V>
impl<'a, V: Copy> Iterator for Vec2DIterator<'a, V> type Item = (V, Point<usize>);
Returns a slice which encompasses the entire map.
pub fn iter_of(&self, area: Rect<usize>) -> Vec2DIterator<'_, V>ⓘNotable traits for Vec2DIterator<'a, V>
impl<'a, V: Copy> Iterator for Vec2DIterator<'a, V> type Item = (V, Point<usize>);
pub fn iter_of(&self, area: Rect<usize>) -> Vec2DIterator<'_, V>ⓘNotable traits for Vec2DIterator<'a, V>
impl<'a, V: Copy> Iterator for Vec2DIterator<'a, V> type Item = (V, Point<usize>);
Allows you to iterate over a sub section of this map.
Trait Implementations
Auto Trait Implementations
impl<V> RefUnwindSafe for Vec2D<V> where
V: RefUnwindSafe,
impl<V> UnwindSafe for Vec2D<V> where
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more