#[repr(transparent)]pub struct RevSlice<T>(_);
Expand description
A DST newtype providing a reversed view of a slice.
Implementations§
source§impl<T> RevSlice<T>
impl<T> RevSlice<T>
These methods work like their equivalents in core
.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn first(&self) -> Option<&T>
pub fn first_mut(&mut self) -> Option<&mut T>
pub fn last(&self) -> Option<&T>
pub fn last_mut(&mut self) -> Option<&mut T>
pub fn split_first(&self) -> Option<(&T, &RevSlice<T>)>
pub fn split_first_mut(&mut self) -> Option<(&T, &RevSlice<T>)>
pub fn split_last(&self) -> Option<(&T, &RevSlice<T>)>
pub fn split_last_mut(&mut self) -> Option<(&T, &RevSlice<T>)>
pub fn split_at(&self, mid: usize) -> (&RevSlice<T>, &RevSlice<T>)
pub fn split_at_mut(
&mut self,
mid: usize
) -> (&mut RevSlice<T>, &mut RevSlice<T>)
Trait Implementations§
source§impl<'a, T> IntoIterator for &'a RevSlice<T>
impl<'a, T> IntoIterator for &'a RevSlice<T>
source§impl<'a, T> IntoIterator for &'a mut RevSlice<T>
impl<'a, T> IntoIterator for &'a mut RevSlice<T>
source§impl<T: PartialEq> PartialEq<RevSlice<T>> for RevSlice<T>
impl<T: PartialEq> PartialEq<RevSlice<T>> for RevSlice<T>
source§impl<T: PartialOrd> PartialOrd<RevSlice<T>> for RevSlice<T>
impl<T: PartialOrd> PartialOrd<RevSlice<T>> for RevSlice<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more