Trait slice_of_array::SliceArrayExt
[−]
[src]
pub trait SliceArrayExt<T> { fn as_array<V: IsSliceomorphic<Element = T>>(&self) -> &V; fn as_mut_array<V: IsSliceomorphic<Element = T>>(&mut self) -> &mut V; }
Trait for viewing a slice as an array of known size, without copying.
The reverse is already provided by a coercion.
Required Methods
fn as_array<V: IsSliceomorphic<Element = T>>(&self) -> &V
View &[T]
as &[T;n]
, panicking on incorrect length.
fn as_mut_array<V: IsSliceomorphic<Element = T>>(&mut self) -> &mut V
View &mut [T]
as &mut [T;n]
, panicking on incorrect length.