Trait Get

Source
pub trait Get {
    type Output;

    // Required methods
    fn get_move(&self, index: usize) -> Option<Self::Output>;
    fn len(&self) -> usize;

    // Provided methods
    fn is_empty(&self) -> bool { ... }
    fn index_move(&self, index: usize) -> Self::Output { ... }
    fn iter<'a>(&'a self) -> Iter<'a, Self> 
       where Self: Sized { ... }
    fn chain<B>(self, other: B) -> Chain<Self, B>
       where Self: Sized,
             B: Get<Output = Self::Output> { ... }
}

Required Associated Types§

Required Methods§

Source

fn get_move(&self, index: usize) -> Option<Self::Output>

Source

fn len(&self) -> usize

Provided Methods§

Source

fn is_empty(&self) -> bool

Source

fn index_move(&self, index: usize) -> Self::Output

Source

fn iter<'a>(&'a self) -> Iter<'a, Self>
where Self: Sized,

Source

fn chain<B>(self, other: B) -> Chain<Self, B>
where Self: Sized, B: Get<Output = Self::Output>,

Implementations on Foreign Types§

Source§

impl<'a, T: Copy> Get for &'a [T]

Source§

type Output = T

Source§

fn len(&self) -> usize

Source§

fn get_move(&self, i: usize) -> Option<Self::Output>

Source§

impl<O: Copy, const N: usize> Get for [O; N]

Source§

type Output = O

Source§

fn get_move(&self, index: usize) -> Option<Self::Output>

Source§

fn len(&self) -> usize

Implementors§

Source§

impl<O, A: Get<Output = O>, B: Get<Output = O>> Get for Chain<A, B>