[][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
;
unsafe fn with_label_unsafe(label: L, len: usize) -> Self;
fn get_label(&self) -> &L;
unsafe fn get_label_unsafe(&self) -> &mut L;
unsafe fn get_unsafe(&self, idx: usize) -> &mut 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.

unsafe fn with_label_unsafe(label: L, len: usize) -> Self

Create a new array, without initializing the values in it.

fn get_label(&self) -> &L

Get immutable access to the label.

unsafe fn get_label_unsafe(&self) -> &mut L

Get a mutable reference to the label. Implementations of this method shouldn't do any safety checks.

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

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

Loading content...

Implementors

impl<A, R, E, L> LabelledArray<E, L> for RcArray<A, R, E, L> where
    A: LabelledArray<E, R> + BaseArrayRef,
    R: RefCounter<L>, 
[src]

impl<E, L> LabelledArray<E, L> for AtomicPtrArray<E, L>[src]

impl<E, L> LabelledArray<E, L> for ThinPtrArray<E, L>[src]

impl<E, L> LabelledArray<E, L> for FatPtrArray<E, L>[src]

Loading content...