pub struct WithCtx<'a, T: SplitableSpanCtx + Clone>(pub T, pub &'a T::Ctx);Tuple Fields§
§0: T§1: &'a T::CtxImplementations§
Trait Implementations§
Source§impl<'a, T: SplitableSpanCtx> SplitableSpanCtx for WithCtx<'a, T>
impl<'a, T: SplitableSpanCtx> SplitableSpanCtx for WithCtx<'a, T>
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)
Auto Trait Implementations§
impl<'a, T> Freeze for WithCtx<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for WithCtx<'a, T>
impl<'a, T> Send for WithCtx<'a, T>
impl<'a, T> Sync for WithCtx<'a, T>
impl<'a, T> Unpin for WithCtx<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for WithCtx<'a, T>
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.