pub struct Grid2NewOrigin<G>{ /* private fields */ }
Expand description
<0, 0> in the inner grid will be new_origin in this grid.
Implementations§
Source§impl<G> Grid2NewOrigin<G>
impl<G> Grid2NewOrigin<G>
Trait Implementations§
Source§impl<G> Grid2 for Grid2NewOrigin<G>
impl<G> Grid2 for Grid2NewOrigin<G>
type Item = <G as Grid2>::Item
type XBound = <<G as Grid2>::XBound as RangeBoundsPlus>::Output
type YBound = <<G as Grid2>::YBound as RangeBoundsPlus>::Output
fn x_bound(&self) -> Self::XBound
fn y_bound(&self) -> Self::YBound
fn in_bounds<I>(&self, coord: I) -> bool
Source§fn enumap<I, F, T>(self, func: F) -> Grid2EnuMap<Self, F, T, I>
fn enumap<I, F, T>(self, func: F) -> Grid2EnuMap<Self, F, T, I>
Element by-value+coord mapping.
Source§fn flatten<I>(self, stride: I) -> Grid2Flat<Self>
fn flatten<I>(self, stride: I) -> Grid2Flat<Self>
Flattening a grid of grids with a regular stride.
Source§fn new_origin<I>(self, new_origin: I) -> Grid2NewOrigin<Self>where
Self: Sized,
Self::XBound: RangeBoundsPlus,
Self::YBound: RangeBoundsPlus,
I: Into<Vector2<i32>>,
fn new_origin<I>(self, new_origin: I) -> Grid2NewOrigin<Self>where
Self: Sized,
Self::XBound: RangeBoundsPlus,
Self::YBound: RangeBoundsPlus,
I: Into<Vector2<i32>>,
<0, 0> in this grid becomes new_origin in resultant grid.
Source§fn oob_handler<I, F>(self, handler: F) -> Grid2OobHandler<Self, I, F>
fn oob_handler<I, F>(self, handler: F) -> Grid2OobHandler<Self, I, F>
Provide function to provide elments at out-of-bounds coordinates. Read more
Source§fn subview<X, Y>(self, new_x: X, new_y: Y) -> Grid2Slice<Self, X, Y>
fn subview<X, Y>(self, new_x: X, new_y: Y) -> Grid2Slice<Self, X, Y>
View a sub-rectangle of this grid. Read more
Source§fn try_subview<X, Y>(
self,
new_x: X,
new_y: Y,
) -> Result<Grid2Slice<Self, X, Y>, Self>
fn try_subview<X, Y>( self, new_x: X, new_y: Y, ) -> Result<Grid2Slice<Self, X, Y>, Self>
View a sub-rectangle of this grid. Read more
Source§fn subview_0to(
self,
new_x_len: i32,
new_y_len: i32,
) -> Grid2Slice<Self, Range0To, Range0To>
fn subview_0to( self, new_x_len: i32, new_y_len: i32, ) -> Grid2Slice<Self, Range0To, Range0To>
View a sub-rectangle of this grid, beginning at origin. Read more
Source§fn try_subview_0to(
self,
new_x_len: i32,
new_y_len: i32,
) -> Result<Grid2Slice<Self, Range0To, Range0To>, Self>
fn try_subview_0to( self, new_x_len: i32, new_y_len: i32, ) -> Result<Grid2Slice<Self, Range0To, Range0To>, Self>
View a sub-rectangle of this grid, beginning at origin. Read more
Source§fn wrapping(self) -> Grid2Wrapping<Self>
fn wrapping(self) -> Grid2Wrapping<Self>
View of this grid which wraps around the edges. Read more
Source§impl<G> Grid2Get for Grid2NewOrigin<G>where
G: Grid2 + Grid2Get,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
impl<G> Grid2Get for Grid2NewOrigin<G>where
G: Grid2 + Grid2Get,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
Source§impl<G> Grid2Mut for Grid2NewOrigin<G>where
G: Grid2 + Grid2Mut,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
impl<G> Grid2Mut for Grid2NewOrigin<G>where
G: Grid2 + Grid2Mut,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
Source§impl<G> Grid2Ref for Grid2NewOrigin<G>where
G: Grid2 + Grid2Ref,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
impl<G> Grid2Ref for Grid2NewOrigin<G>where
G: Grid2 + Grid2Ref,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
Source§impl<G> Grid2Set for Grid2NewOrigin<G>where
G: Grid2 + Grid2Set,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
impl<G> Grid2Set for Grid2NewOrigin<G>where
G: Grid2 + Grid2Set,
<G as Grid2>::XBound: RangeBoundsPlus,
<G as Grid2>::YBound: RangeBoundsPlus,
Auto Trait Implementations§
impl<G> Freeze for Grid2NewOrigin<G>
impl<G> RefUnwindSafe for Grid2NewOrigin<G>where
G: RefUnwindSafe,
<<G as Grid2>::XBound as RangeBoundsPlus>::Output: RefUnwindSafe,
<<G as Grid2>::YBound as RangeBoundsPlus>::Output: RefUnwindSafe,
impl<G> Send for Grid2NewOrigin<G>
impl<G> Sync for Grid2NewOrigin<G>
impl<G> Unpin for Grid2NewOrigin<G>
impl<G> UnwindSafe for Grid2NewOrigin<G>where
G: UnwindSafe,
<<G as Grid2>::XBound as RangeBoundsPlus>::Output: UnwindSafe,
<<G as Grid2>::YBound as RangeBoundsPlus>::Output: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more