Struct uuid::timestamp::context::std_support::ThreadLocalContext
source · pub struct ThreadLocalContext<C: 'static>(&'static LocalKey<C>);
Expand description
A wrapper for a context that uses thread-local storage.
Tuple Fields§
§0: &'static LocalKey<C>
Implementations§
Trait Implementations§
source§impl<C: ClockSequence + 'static> ClockSequence for ThreadLocalContext<C>
impl<C: ClockSequence + 'static> ClockSequence for ThreadLocalContext<C>
§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