[−][src]Struct grid_2d::Grid
Methods
impl<T, C: CoordSystem> Grid<T, C>[src]
impl<T, C: CoordSystem> Grid<T, C>pub fn new_fn_with_coord_system<F>(coord_system: C, f: F) -> Self where | [src] |
pub fn try_new_iterator<I>( | [src] |
pub fn new_iterator<I>(coord_system: C, iterator: I) -> Self where | [src] |
pub fn new_grid_map_with_coord<U, F>(grid: Grid<U, C>, f: F) -> Self where | [src] |
pub fn new_grid_map<U, F>(grid: Grid<U, C>, f: F) -> Self where | [src] |
impl<T: Clone, C: CoordSystem> Grid<T, C>[src]
impl<T: Clone, C: CoordSystem> Grid<T, C>pub fn new_clone_with_coord_system(coord_system: C, value: T) -> Self | [src] |
impl<T: Default, C: CoordSystem> Grid<T, C>[src]
impl<T: Default, C: CoordSystem> Grid<T, C>pub fn new_default_with_coord_system(coord_system: C) -> Self | [src] |
impl<T> Grid<T, XThenY>[src]
impl<T> Grid<T, XThenY>impl<T: Clone> Grid<T, XThenY>[src]
impl<T: Clone> Grid<T, XThenY>impl<T: Default> Grid<T, XThenY>[src]
impl<T: Default> Grid<T, XThenY>pub fn new_default(size: Size) -> Self | [src] |
impl<T, C: CoordSystem> Grid<T, C>[src]
impl<T, C: CoordSystem> Grid<T, C>pub fn width(&self) -> u32 | [src] |
pub fn height(&self) -> u32 | [src] |
pub fn size(&self) -> Size | [src] |
pub fn len(&self) -> usize | [src] |
pub fn iter(&self) -> GridIter<T> | [src] |
pub fn iter_mut(&mut self) -> GridIterMut<T> | [src] |
pub fn coord_iter(&self) -> C::CoordIter | [src] |
pub fn get(&self, coord: Coord) -> Option<&T> | [src] |
pub fn get_mut(&mut self, coord: Coord) -> Option<&mut T> | [src] |
pub fn get_tiled(&self, coord: Coord) -> &T | [src] |
pub fn get_tiled_mut(&mut self, coord: Coord) -> &mut T | [src] |
pub fn index_of_coord(&self, coord: Coord) -> Option<usize> | [src] |
pub fn get_index(&self, index: usize) -> &T | [src] |
pub fn get_index_mut(&mut self, index: usize) -> &mut T | [src] |
pub fn get_checked(&self, coord: Coord) -> &T | [src] |
pub fn get_checked_mut(&mut self, coord: Coord) -> &mut T | [src] |
pub fn enumerate(&self) -> GridEnumerate<T, C::CoordIter> | [src] |
pub fn enumerate_mut(&mut self) -> GridEnumerateMut<T, C::CoordIter> | [src] |
pub fn into_enumerate(self) -> GridIntoEnumerate<T, C::CoordIter> | [src] |
Trait Implementations
impl<T: PartialEq, C: PartialEq + CoordSystem> PartialEq<Grid<T, C>> for Grid<T, C>[src]
impl<T: PartialEq, C: PartialEq + CoordSystem> PartialEq<Grid<T, C>> for Grid<T, C>impl<T: Eq, C: Eq + CoordSystem> Eq for Grid<T, C>[src]
impl<T: Eq, C: Eq + CoordSystem> Eq for Grid<T, C>impl<T: PartialOrd, C: PartialOrd + CoordSystem> PartialOrd<Grid<T, C>> for Grid<T, C>[src]
impl<T: PartialOrd, C: PartialOrd + CoordSystem> PartialOrd<Grid<T, C>> for Grid<T, C>fn partial_cmp(&self, other: &Grid<T, C>) -> Option<Ordering> | [src] |
fn lt(&self, other: &Grid<T, C>) -> bool | [src] |
fn le(&self, other: &Grid<T, C>) -> bool | [src] |
fn gt(&self, other: &Grid<T, C>) -> bool | [src] |
fn ge(&self, other: &Grid<T, C>) -> bool | [src] |
impl<T: Ord, C: Ord + CoordSystem> Ord for Grid<T, C>[src]
impl<T: Ord, C: Ord + CoordSystem> Ord for Grid<T, C>fn cmp(&self, other: &Grid<T, C>) -> Ordering | [src] |
fn max(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self | 1.21.0 [src] |
Compares and returns the minimum of two values. Read more
impl<T: Clone, C: Clone + CoordSystem> Clone for Grid<T, C>[src]
impl<T: Clone, C: Clone + CoordSystem> Clone for Grid<T, C>fn clone(&self) -> Grid<T, C> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source. Read more
impl<T, C: CoordSystem> IntoIterator for Grid<T, C>[src]
impl<T, C: CoordSystem> IntoIterator for Grid<T, C>type Item = T
The type of the elements being iterated over.
type IntoIter = GridIntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter | [src] |
impl<T: Debug, C: Debug + CoordSystem> Debug for Grid<T, C>[src]
impl<T: Debug, C: Debug + CoordSystem> Debug for Grid<T, C>impl<T: Hash, C: Hash + CoordSystem> Hash for Grid<T, C>[src]
impl<T: Hash, C: Hash + CoordSystem> Hash for Grid<T, C>fn hash<__HTC: Hasher>(&self, state: &mut __HTC) | [src] |
fn hash_slice<H>(data: &[Self], state: &mut H) where | 1.3.0 [src] |
Feeds a slice of this type into the given [Hasher]. Read more
impl<T, C: CoordSystem> Index<usize> for Grid<T, C>[src]
impl<T, C: CoordSystem> Index<usize> for Grid<T, C>type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output | [src] |
impl<T, C: CoordSystem> IndexMut<usize> for Grid<T, C>[src]
impl<T, C: CoordSystem> IndexMut<usize> for Grid<T, C>Auto Trait Implementations
impl<T, C> Send for Grid<T, C> where
C: Send,
T: Send,
impl<T, C> Send for Grid<T, C> where
C: Send,
T: Send, impl<T, C> Sync for Grid<T, C> where
C: Sync,
T: Sync,
impl<T, C> Sync for Grid<T, C> where
C: Sync,
T: Sync, Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<I> IntoIterator for I where
I: Iterator, [src]
impl<I> IntoIterator for I where
I: Iterator, type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I | [src] |
impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T | [src] |