Struct dont_panic_slice::DPSlice
[−]
[src]
pub struct DPSlice<T>(_);
Methods
impl<T> DPSlice<T>
[src]
fn as_rust_slice(this: &Self) -> &[T]
fn as_rust_slice_mut(this: &mut Self) -> &mut [T]
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn first(&self) -> Option<&T>
fn first_mut(&mut self) -> Option<&mut T>
fn split_first(&self) -> Option<(&T, &[T])>
fn split_first_mut(&self) -> Option<(&T, &[T])>
fn split_last(&self) -> Option<(&T, &[T])>
fn split_last_mut(&mut self) -> Option<(&T, &[T])>
fn swap(&mut self, a: usize, b: usize)
fn windows(&self, size: usize) -> Windows<T>
fn chunks(&self, size: usize) -> Chunks<T>
fn chunks_mut(&mut self, size: usize) -> ChunksMut<T>
fn split_at(&self, mid: usize) -> (&[T], &[T])
fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T])
Trait Implementations
impl<'a, T> From<&'a [T]> for &'a DPSlice<T>
[src]
fn from(slice: &[T]) -> Self
Performs the conversion.
impl<'a, T> From<&'a mut [T]> for &'a mut DPSlice<T>
[src]
fn from(slice: &mut [T]) -> Self
Performs the conversion.
impl<T> Index<usize> for DPSlice<T>
[src]
type Output = T
The returned type after indexing
fn index(&self, index: usize) -> &Self::Output
The method for the indexing (container[index]
) operation