pub struct Id(/* private fields */);Expand description
Unique identifier for a placed point
128 bits, timestamp-prefixed for natural time ordering.
Implementations§
Source§impl Id
impl Id
Sourcepub fn now() -> Self
pub fn now() -> Self
Generate a new Id for the current moment
Uses current timestamp + counter + random bytes for uniqueness.
Sourcepub fn from_bytes(bytes: [u8; 16]) -> Self
pub fn from_bytes(bytes: [u8; 16]) -> Self
Create an Id from raw bytes
Sourcepub fn timestamp_ms(&self) -> u64
pub fn timestamp_ms(&self) -> u64
Extract the timestamp component (milliseconds since epoch)
Trait Implementations§
Source§impl Ord for Id
impl Ord for Id
Source§impl PartialOrd for Id
impl PartialOrd for Id
impl Copy for Id
impl Eq for Id
impl StructuralPartialEq for Id
Auto Trait Implementations§
impl Freeze for Id
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnwindSafe for Id
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more