[−][src]Struct loaf::LoafN
Generally the same as Loaf, but guarantees at least N elements (implemented with const generics, so it is only avaliable on nightly)
Currently there is no documentation, but functions work the same way as in Loaf
Fields
loaf: [T; N]
rest: [T]
Implementations
impl<T, const N: usize> LoafN<T, N>
[src]
pub fn len(&self) -> usize
[src]
pub fn first(&self) -> &T
[src]
pub fn first_mut(&mut self) -> &mut T
[src]
pub fn last(&self) -> &T
[src]
pub fn last_mut(&mut self) -> &mut T
[src]
pub fn from_slice(slice: &[T]) -> Option<&Self>
[src]
pub fn from_slice_mut(slice: &mut [T]) -> Option<&mut Self>
[src]
pub fn as_slice(&self) -> &[T]
[src]
pub fn as_mut_slice(&mut self) -> &mut [T]
[src]
pub unsafe fn from_slice_unchecked(slice: &[T]) -> &Self
[src]
pub unsafe fn from_slice_mut_unchecked(slice: &mut [T]) -> &mut Self
[src]
pub fn as_smallest_loaf(&self) -> &LoafN<T, 1>
[src]
pub fn as_smallest_loaf_mut(&mut self) -> &mut LoafN<T, 1>
[src]
pub fn split_first(&self) -> (&T, &[T])
[src]
pub fn split_first_mut(&mut self) -> (&mut T, &mut [T])
[src]
impl<T, const N: usize> LoafN<T, N>
[src]
pub fn try_from_boxed_slice(boxed: Box<[T]>) -> Result<Box<Self>, Box<[T]>>
[src]
pub fn into_boxed_slice(self: Box<Self>) -> Box<[T]>
[src]
Auto Trait Implementations
impl<const N: usize, T> Send for LoafN<T, N> where
T: Send,
T: Send,
impl<const N: usize, T> Sync for LoafN<T, N> where
T: Sync,
T: Sync,
impl<const N: usize, T> Unpin for LoafN<T, N> where
T: Unpin,
T: Unpin,