pub struct ReverseSpan<S>(pub S);Expand description
A splitablespan in reverse. This is useful for making lists in descending order.
Tuple Fields§
§0: STrait Implementations§
Source§impl<S: Clone> Clone for ReverseSpan<S>
impl<S: Clone> Clone for ReverseSpan<S>
Source§fn clone(&self) -> ReverseSpan<S>
fn clone(&self) -> ReverseSpan<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S: Debug> Debug for ReverseSpan<S>
impl<S: Debug> Debug for ReverseSpan<S>
Source§impl<S: Default> Default for ReverseSpan<S>
impl<S: Default> Default for ReverseSpan<S>
Source§fn default() -> ReverseSpan<S>
fn default() -> ReverseSpan<S>
Returns the “default value” for a type. Read more
Source§impl<S: HasLength> HasLength for ReverseSpan<S>
impl<S: HasLength> HasLength for ReverseSpan<S>
Source§impl<S: Hash> Hash for ReverseSpan<S>
impl<S: Hash> Hash for ReverseSpan<S>
Source§impl<S: MergableSpan> MergableSpan for ReverseSpan<S>
impl<S: MergableSpan> MergableSpan for ReverseSpan<S>
Source§impl<S: PartialEq> PartialEq for ReverseSpan<S>
impl<S: PartialEq> PartialEq for ReverseSpan<S>
Source§impl<S: SplitableSpanCtx<Ctx = ()>> SplitableSpanCtx for ReverseSpan<S>
impl<S: SplitableSpanCtx<Ctx = ()>> SplitableSpanCtx for ReverseSpan<S>
type Ctx = ()
Source§fn truncate_ctx(&mut self, at: usize, _ctx: &Self::Ctx) -> Self
fn truncate_ctx(&mut self, at: usize, _ctx: &Self::Ctx) -> Self
Split the entry, returning the part of the entry which was jettisoned. After truncating at
pos, self.len() == pos and the returned value contains the rest of the items. Read moreSource§fn truncate_keeping_right_ctx(&mut self, at: usize, _ctx: &Self::Ctx) -> Self
fn truncate_keeping_right_ctx(&mut self, at: usize, _ctx: &Self::Ctx) -> Self
The inverse of truncate. This method mutably truncates an item, keeping all content from
at..item.len() and returning the item range from 0..at.
fn split_ctx(self, at: usize, ctx: &Self::Ctx) -> (Self, Self)
impl<S: Copy> Copy for ReverseSpan<S>
impl<S: Eq> Eq for ReverseSpan<S>
impl<S> StructuralPartialEq for ReverseSpan<S>
Auto Trait Implementations§
impl<S> Freeze for ReverseSpan<S>where
S: Freeze,
impl<S> RefUnwindSafe for ReverseSpan<S>where
S: RefUnwindSafe,
impl<S> Send for ReverseSpan<S>where
S: Send,
impl<S> Sync for ReverseSpan<S>where
S: Sync,
impl<S> Unpin for ReverseSpan<S>where
S: Unpin,
impl<S> UnwindSafe for ReverseSpan<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SplitableSpan for Twhere
T: SplitableSpanCtx<Ctx = ()>,
impl<T> SplitableSpan for Twhere
T: SplitableSpanCtx<Ctx = ()>,
Source§fn truncate(&mut self, at: usize) -> Self
fn truncate(&mut self, at: usize) -> Self
Split the entry, returning the part of the entry which was jettisoned. After truncating at
pos, self.len() == pos and the returned value contains the rest of the items. Read moreSource§fn truncate_keeping_right(&mut self, at: usize) -> Self
fn truncate_keeping_right(&mut self, at: usize) -> Self
The inverse of truncate. This method mutably truncates an item, keeping all content from
at..item.len() and returning the item range from 0..at.