[][src]Trait heaparray::LabelledArray

pub trait LabelledArray<E, L>: CopyMap<usize, E> {
    fn with_label<F>(label: L, len: usize, func: F) -> Self
    where
        F: FnMut(&mut L, usize) -> E
;
fn get_label(&self) -> &L;
unsafe fn get_unchecked(&self, idx: usize) -> &E; }

Array with an optional label struct stored next to the data.

Required methods

fn with_label<F>(label: L, len: usize, func: F) -> Self where
    F: FnMut(&mut L, usize) -> E, 

Create a new array, with values initialized using a provided function, and label initialized to a provided value.

fn get_label(&self) -> &L

Get a reference to the label.

unsafe fn get_unchecked(&self, idx: usize) -> &E

Get a reference to the element at a specified index. Implementations of this method shouldn't do any safety checks.

Loading content...

Implementors

impl<E, L, P> LabelledArray<E, L> for SafeArray<E, L, P> where
    P: SafeArrayPtr<E, L>, 
[src]

Loading content...