pub trait IdSource: Send + Sync {
// Required method
fn new_id(&self) -> Uuid;
// Provided method
fn new_device_id(&self) -> DeviceId { ... }
}Expand description
The source of new ids, supplied when creating or opening a store.
Required Methods§
Provided Methods§
Sourcefn new_device_id(&self) -> DeviceId
fn new_device_id(&self) -> DeviceId
A fresh device id derived from this source, without another randomness source. Every install and restored copy receives a new device id (§10.4).
Uses 62 payload bits from the UUID’s last eight bytes and two from its eighth byte: all 64 are random in UUIDv4 and UUIDv7. The version, variant and UUIDv7 timestamp contribute no bits.