logo
pub trait AppendFront<T> {
    type Output;

    fn append_front(self, element: T) -> Self::Output;
}
Expand description

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

Example

extern crate dimensioned as dim;
#[macro_use]
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);
}

Required Associated Types

The resulting type after performing the append

Required Methods

Append element to the front of self.

Implementations on Foreign Types

Implementors