[][src]Struct grid_trait::grid2::combinate::flatten::Grid2Flat

pub struct Grid2Flat<G> where
    G: Grid2,
    <G as Grid2>::Item: Grid2,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
{ /* fields omitted */ }

Flattened Grid2 of Grid2.

This unfortunately cannot detect ahead-of-time bugs if the inner grid has length less than the stride, so panics will probably occur if that happens.

Methods

impl<G> Grid2Flat<G> where
    G: Grid2,
    <G as Grid2>::Item: Grid2,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
[src]

pub fn new<I>(doublegrid: G, stride: I) -> Self where
    I: Into<Vector2<i32>>,
    <G as Grid2>::XBound: RangeBoundsTimes,
    <G as Grid2>::YBound: RangeBoundsTimes
[src]

pub fn stride<I>(&self) -> I where
    I: From<Vector2<i32>>, 
[src]

pub fn outer_inner_coord<I>(&self, coord: I) -> (I, I) where
    I: Into<Vector2<i32>> + From<Vector2<i32>>, 
[src]

Trait Implementations

impl<G> Grid2 for Grid2Flat<G> where
    G: Grid2,
    <G as Grid2>::Item: Grid2,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
[src]

type Item = <<G as Grid2>::Item as Grid2>::Item

type XBound = <G as Grid2>::XBound

type YBound = <G as Grid2>::YBound

impl<G> Grid2Get for Grid2Flat<G> where
    G: Grid2 + Grid2Ref,
    <G as Grid2>::Item: Grid2 + Grid2Get,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
[src]

impl<G> Grid2Mut for Grid2Flat<G> where
    G: Grid2 + Grid2Mut,
    <G as Grid2>::Item: Grid2 + Grid2Mut,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
[src]

impl<G> Grid2Ref for Grid2Flat<G> where
    G: Grid2 + Grid2Ref,
    <G as Grid2>::Item: Grid2 + Grid2Ref,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
[src]

impl<G> Grid2Set for Grid2Flat<G> where
    G: Grid2 + Grid2Mut,
    <G as Grid2>::Item: Grid2 + Grid2Set,
    <G as Grid2>::XBound: Clone,
    <G as Grid2>::YBound: Clone
[src]

Auto Trait Implementations

impl<G> RefUnwindSafe for Grid2Flat<G> where
    G: RefUnwindSafe,
    <G as Grid2>::XBound: RefUnwindSafe,
    <G as Grid2>::YBound: RefUnwindSafe

impl<G> Send for Grid2Flat<G> where
    G: Send,
    <G as Grid2>::XBound: Send,
    <G as Grid2>::YBound: Send

impl<G> Sync for Grid2Flat<G> where
    G: Sync,
    <G as Grid2>::XBound: Sync,
    <G as Grid2>::YBound: Sync

impl<G> Unpin for Grid2Flat<G> where
    G: Unpin,
    <G as Grid2>::XBound: Unpin,
    <G as Grid2>::YBound: Unpin

impl<G> UnwindSafe for Grid2Flat<G> where
    G: UnwindSafe,
    <G as Grid2>::XBound: UnwindSafe,
    <G as Grid2>::YBound: 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> 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.