logo

Struct uuid::v1::Context

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

A thread-safe, stateful context for the v1 generator to help ensure process-wide uniqueness.

Implementations

Creates a thread-safe, internally mutable context to help ensure uniqueness.

This is a context which can be shared across threads. It maintains an internal counter that is incremented at every request, the value ends up in the clock_seq portion of the UUID (the fourth group). This will improve the probability that the UUID is unique across the process.

Creates a thread-safe, internally mutable context that’s seeded with a random value.

This method requires either the rng or fast-rng feature to also be enabled.

This is a context which can be shared across threads. It maintains an internal counter that is incremented at every request, the value ends up in the clock_seq portion of the UUID (the fourth group). This will improve the probability that the UUID is unique across the process.

Trait Implementations

Return a 16-bit number that will be used as the “clock sequence” in the UUID. The number must be different if the time has changed since the last time a clock sequence was requested. 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.