pub struct RecordId { /* private fields */ }Expand description
Stable, globally unambiguous record identifier: pd:<origin>:<uuid>.
Implementations§
Source§impl RecordId
impl RecordId
Sourcepub fn generate(origin: &Origin) -> Self
pub fn generate(origin: &Origin) -> Self
Mint a new identifier at origin. UUIDv7 keeps ids roughly time-ordered.
pub fn from_parts(origin: Origin, local: Uuid) -> Self
pub fn origin(&self) -> &Origin
pub fn local(&self) -> Uuid
pub fn is_from(&self, origin: &Origin) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RecordId
impl<'de> Deserialize<'de> for RecordId
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RecordId
Source§impl Ord for RecordId
impl Ord for RecordId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for RecordId
impl PartialOrd for RecordId
impl StructuralPartialEq for RecordId
Auto Trait Implementations§
impl Freeze for RecordId
impl RefUnwindSafe for RecordId
impl Send for RecordId
impl Sync for RecordId
impl Unpin for RecordId
impl UnsafeUnpin for RecordId
impl UnwindSafe for RecordId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more