Trait dimensioned::array::AppendFront [] [src]

pub trait AppendFront<T> {
    type Output;
    fn append_front(self, element: T) -> Self::Output;

Implemented for GenericArray, this allows growable GenericArrays by appending elements to the front.


extern crate dimensioned as dim;
extern crate generic_array;

use dim::array::AppendFront;

fn main() {
    let a = arr![u32; 1, 2];
    let a2 = arr![u32; 0, 1, 2];

    assert_eq!(a.append_front(0), a2);

Associated Types

The resulting type after performing the append

Required Methods

Append element to the front of self.