[][src]Trait rect_iter::Get2D

pub trait Get2D {
    type Item;
    fn try_get_xy<T: ToPrimitive>(
        &self,
        x: T,
        y: T
    ) -> Result<&Self::Item, IndexError>; fn get_xy<T: ToPrimitive>(&self, x: T, y: T) -> &Self::Item { ... }
fn get_p<T: ToPrimitive, P: IntoTuple2<T>>(&self, p: P) -> &Self::Item { ... }
fn try_get_p<T: ToPrimitive, P: IntoTuple2<T>>(
        &self,
        p: P
    ) -> Result<&Self::Item, IndexError> { ... } }

A trait which provides common access interfaces to 2D Array type.

Associated Types

type Item

Loading content...

Required methods

fn try_get_xy<T: ToPrimitive>(
    &self,
    x: T,
    y: T
) -> Result<&Self::Item, IndexError>

Loading content...

Provided methods

fn get_xy<T: ToPrimitive>(&self, x: T, y: T) -> &Self::Item

fn get_p<T: ToPrimitive, P: IntoTuple2<T>>(&self, p: P) -> &Self::Item

fn try_get_p<T: ToPrimitive, P: IntoTuple2<T>>(
    &self,
    p: P
) -> Result<&Self::Item, IndexError>

Loading content...

Implementations on Foreign Types

impl<D> Get2D for Vec<Vec<D>>[src]

type Item = D

impl<P, C> Get2D for ImageBuffer<P, C> where
    P: Pixel + 'static,
    P::Subpixel: 'static,
    C: Deref<Target = [P::Subpixel]>, 
[src]

type Item = P

impl<S: Data> Get2D for ArrayBase<S, Ix2>[src]

type Item = S::Elem

Loading content...

Implementors

Loading content...