pub struct ThreadLocalContext<C: 'static>(/* private fields */);
Expand description
A wrapper for a context that uses thread-local storage.
Implementations§
Trait Implementations§
Source§impl<C: ClockSequence + 'static> ClockSequence for ThreadLocalContext<C>
impl<C: ClockSequence + 'static> ClockSequence for ThreadLocalContext<C>
Source§type Output = <C as ClockSequence>::Output
type Output = <C as ClockSequence>::Output
The type of sequence returned by this counter.
Source§fn generate_sequence(&self, seconds: u64, subsec_nanos: u32) -> Self::Output
fn generate_sequence(&self, seconds: u64, subsec_nanos: u32) -> Self::Output
Get the next value in the sequence to feed into a timestamp. Read more
Source§fn generate_timestamp_sequence(
&self,
seconds: u64,
subsec_nanos: u32,
) -> (Self::Output, u64, u32)
fn generate_timestamp_sequence( &self, seconds: u64, subsec_nanos: u32, ) -> (Self::Output, u64, u32)
Get the next value in the sequence, potentially also adjusting the timestamp. Read more
Source§fn usable_bits(&self) -> usize
fn usable_bits(&self) -> usize
The number of usable bits from the least significant bit in the result of
ClockSequence::generate_sequence
or ClockSequence::generate_timestamp_sequence
. Read moreAuto Trait Implementations§
impl<C> Freeze for ThreadLocalContext<C>
impl<C> RefUnwindSafe for ThreadLocalContext<C>
impl<C> Send for ThreadLocalContext<C>
impl<C> Sync for ThreadLocalContext<C>
impl<C> Unpin for ThreadLocalContext<C>
impl<C> UnwindSafe for ThreadLocalContext<C>
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