[][src]Trait rosy::array::ArrayIndex

pub trait ArrayIndex<O: Object> {
    type Output;
    fn get(self, array: Array<O>) -> Option<Self::Output>;
unsafe fn get_unchecked(self, array: Array<O>) -> Self::Output; }

A type that can be used to index into an Array.

Associated Types

type Output

The output returned from indexing.

Loading content...

Required methods

fn get(self, array: Array<O>) -> Option<Self::Output>

Returns the output at self, or None if self is out-of-bounds.

unsafe fn get_unchecked(self, array: Array<O>) -> Self::Output

Returns the output at self without safety checks.

Loading content...

Implementations on Foreign Types

impl<O: Object> ArrayIndex<O> for usize[src]

type Output = O

impl<O: Object> ArrayIndex<O> for Range<usize>[src]

type Output = Array<O>

Loading content...

Implementors

Loading content...