Struct uuid::timestamp::context::Context

source ·
pub struct Context { /* private fields */ }
Expand description

A thread-safe, wrapping counter that produces 14-bit numbers.

This type should be used when constructing version 1 and version 6 UUIDs.

Implementations

Construct a new context that’s initialized with the given value.

The starting value should be a random number, so that UUIDs from different systems with the same timestamps are less likely to collide. When the rng feature is enabled, prefer the Context::new_random method.

Construct a new context that’s initialized with a random value.

Trait Implementations

The type of sequence returned by this counter.
Get the next value in the sequence to feed into a timestamp. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.