pub struct UuidGen(_);
Expand description

A UUID generator object.

Instances of the UUID generator object are thread-safe to generate UUIDs.

Implementations

Creates a new UUID generator with custom node information. Note: This object is thread-safe. It is best practice to create and reuse a single object per application.

Generates a V1 (time) UUID.

Generates a new V4 (random) UUID

Generates a V1 (time) UUID for the specified time.

Examples
let generator = UuidGen::default();
let uuid = generator.gen_from_time(1457486866742u64);

Trait Implementations

Formats the value using the given formatter. Read more

Creates a new thread-safe UUID generator

Executes the destructor for this type. 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.

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.