pub struct RecordVersion { /* private fields */ }Expand description
Which record, and where in that record’s history, a write applies.
A sequence number alone identifies a position but not a record: a deregistered and re-registered URI starts counting again from zero, and a proof captured before the gap would sit above the new record’s history. The registration time pins the instance so it cannot.
Implementations§
Source§impl RecordVersion
impl RecordVersion
Sourcepub const fn new(registered_at: SystemTime, sequence: u64) -> Self
pub const fn new(registered_at: SystemTime, sequence: u64) -> Self
Names a version explicitly, for a caller holding the parts rather than the record.
Sourcepub fn of(record: &Registration) -> Self
pub fn of(record: &Registration) -> Self
The version record currently holds.
Sourcepub fn next(record: &Registration) -> Self
pub fn next(record: &Registration) -> Self
The version the next write to record claims.
Sourcepub const fn registered_at(&self) -> SystemTime
pub const fn registered_at(&self) -> SystemTime
Returns the registration time identifying the record instance.
Trait Implementations§
Source§impl Clone for RecordVersion
impl Clone for RecordVersion
impl Copy for RecordVersion
Source§impl Debug for RecordVersion
impl Debug for RecordVersion
impl Eq for RecordVersion
Source§impl PartialEq for RecordVersion
impl PartialEq for RecordVersion
impl StructuralPartialEq for RecordVersion
Auto Trait Implementations§
impl Freeze for RecordVersion
impl RefUnwindSafe for RecordVersion
impl Send for RecordVersion
impl Sync for RecordVersion
impl Unpin for RecordVersion
impl UnsafeUnpin for RecordVersion
impl UnwindSafe for RecordVersion
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