Struct grid_2d::coord_system::XThenY
source · pub struct XThenY { /* private fields */ }
Expand description
CoordSystem
which starts in the top-left corner and traverses
each row from top to bottom, traversing from left to right
within each row.
Trait Implementations
sourceimpl CoordSystem for XThenY
impl CoordSystem for XThenY
type CoordIter = XThenYIter
type CoordIter = XThenYIter
An iterator which yields coords in thet same order as elements
are stored in the grid. Read more
sourcefn index_of_coord_unchecked(&self, coord: Coord) -> usize
fn index_of_coord_unchecked(&self, coord: Coord) -> usize
Given a coord, returns the index of the backing Vec which
corresponds to that coordinate. May assume that
coord.is_valid(self.size())
. Read moresourcefn coord_iter(&self) -> Self::CoordIter
fn coord_iter(&self) -> Self::CoordIter
Returns an iterator over coords
fn index_of_coord_checked(&self, coord: Coord) -> usize
fn index_of_coord(&self, coord: Coord) -> Option<usize>
fn index_of_normalized_coord(&self, coord: Coord) -> usize
sourceimpl Ord for XThenY
impl Ord for XThenY
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<XThenY> for XThenY
impl PartialOrd<XThenY> for XThenY
sourcefn partial_cmp(&self, other: &XThenY) -> Option<Ordering>
fn partial_cmp(&self, other: &XThenY) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for XThenY
impl StructuralEq for XThenY
impl StructuralPartialEq for XThenY
Auto Trait Implementations
impl RefUnwindSafe for XThenY
impl Send for XThenY
impl Sync for XThenY
impl Unpin for XThenY
impl UnwindSafe for XThenY
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more