[][src]Struct grid_trait::grid2::combinate::slice::Grid2Slice

pub struct Grid2Slice<G, X, Y> where
    G: Grid2,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
{ /* fields omitted */ }

Sub-view of a Grid2.

The valid coordinates in this grid are a subset of the valid coordinates in the inner grid.

Methods

impl<G, X, Y> Grid2Slice<G, X, Y> where
    G: Grid2,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
[src]

pub fn try_new(inner: G, new_x: X, new_y: Y) -> Result<Self, G>[src]

Fails if the new bounds are not a subset of the old ones.

pub fn new(inner: G, new_x: X, new_y: Y) -> Self where
    X: Debug,
    Y: Debug,
    <G as Grid2>::XBound: Debug,
    <G as Grid2>::YBound: Debug
[src]

Panics if the new bounds are not a subset of the old ones.

Trait Implementations

impl<G, X, Y> Grid2 for Grid2Slice<G, X, Y> where
    G: Grid2,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
[src]

type Item = <G as Grid2>::Item

type XBound = X

type YBound = Y

impl<G, X, Y> Grid2Get for Grid2Slice<G, X, Y> where
    G: Grid2 + Grid2Get,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
[src]

impl<G> Grid2Len for Grid2Slice<G, Range0To, Range0To> where
    G: Grid2
[src]

impl<G, X, Y> Grid2Mut for Grid2Slice<G, X, Y> where
    G: Grid2 + Grid2Mut,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
[src]

impl<G, X, Y> Grid2Ref for Grid2Slice<G, X, Y> where
    G: Grid2 + Grid2Ref,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
[src]

impl<G, X, Y> Grid2Set for Grid2Slice<G, X, Y> where
    G: Grid2 + Grid2Set,
    X: RangeBounds<i32> + Clone,
    Y: RangeBounds<i32> + Clone
[src]

Auto Trait Implementations

impl<G, X, Y> RefUnwindSafe for Grid2Slice<G, X, Y> where
    G: RefUnwindSafe,
    X: RefUnwindSafe,
    Y: RefUnwindSafe

impl<G, X, Y> Send for Grid2Slice<G, X, Y> where
    G: Send,
    X: Send,
    Y: Send

impl<G, X, Y> Sync for Grid2Slice<G, X, Y> where
    G: Sync,
    X: Sync,
    Y: Sync

impl<G, X, Y> Unpin for Grid2Slice<G, X, Y> where
    G: Unpin,
    X: Unpin,
    Y: Unpin

impl<G, X, Y> UnwindSafe for Grid2Slice<G, X, Y> where
    G: UnwindSafe,
    X: UnwindSafe,
    Y: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Grid2 for T where
    T: Deref,
    <T as Deref>::Target: Grid2
[src]

type Item = <<T as Deref>::Target as Grid2>::Item

type XBound = <<T as Deref>::Target as Grid2>::XBound

type YBound = <<T as Deref>::Target as Grid2>::YBound

impl<T> Grid2Get for T where
    T: Deref,
    <T as Deref>::Target: Grid2Get
[src]

impl<T> Grid2Len for T where
    T: Deref,
    <T as Deref>::Target: Grid2Len
[src]

impl<T> Grid2Mut for T where
    T: Deref + DerefMut,
    <T as Deref>::Target: Grid2Mut
[src]

impl<T> Grid2Ref for T where
    T: Deref,
    <T as Deref>::Target: Grid2Ref
[src]

impl<T> Grid2Set for T where
    T: Deref + DerefMut,
    <T as Deref>::Target: Grid2Set
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.