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 GenericArray
s 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); }
Associated Types
type Output
The resulting type after performing the append
Required Methods
fn append_front(self, element: T) -> Self::Output
Append element
to the front of self
.
Implementors
impl<T, N> AppendFront<T> for GenericArray<T, N> where
T: Default,
N: Add<B1> + ArrayLength<T>,
Add1<N>: ArrayLength<T>,