Struct cassandra_cpp::UuidGen
source · [−]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 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);