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 more