[][src]Trait heaparray::LabelledArray

pub trait LabelledArray<'a, E, L>: Array<'a, E> where
    E: 'a, 
{ 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;
fn get_label_mut(&mut self) -> &mut 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.

fn get_label_mut(&mut self) -> &mut L

Get mutable reference 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, A, R, B: ?Sized, E, L> LabelledArray<'a, E, L> for RcArray<'a, A, R, B, E, L> where
    A: 'a + LabelledArray<'a, E, R> + BaseArrayRef + UnsafeArrayRef<'a, B>,
    R: 'a + RefCounter<L>,
    L: 'a,
    E: 'a,
    B: 'a, 
[src]

impl<'a, E, L> LabelledArray<'a, E, L> for FatPtrArray<'a, E, L> where
    E: 'a, 
[src]

impl<'a, E, L> LabelledArray<'a, E, L> for FpArcArray<'a, E, L>[src]

impl<'a, E, L> LabelledArray<'a, E, L> for FpRcArray<'a, E, L>[src]

impl<'a, E, L> LabelledArray<'a, E, L> for TpArcArray<'a, E, L>[src]

impl<'a, E, L> LabelledArray<'a, E, L> for TpRcArray<'a, E, L>[src]

impl<'a, E, L> LabelledArray<'a, E, L> for HeapArray<'a, E, L>[src]

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

Loading content...