pub struct AuditSequence(/* private fields */);Expand description
Position of a record within one ceremony’s audit journal.
Sequences start at 1 and advance by exactly one. A gap is not a missing record to be tolerated: it is evidence that the journal was truncated.
Implementations§
Source§impl AuditSequence
impl AuditSequence
pub const FIRST: Self
pub fn new(value: u64) -> Result<Self, DomainError>
pub fn value(self) -> u64
Sourcepub fn next(self) -> Self
pub fn next(self) -> Self
The sequence that must follow this one.
Saturates rather than wrapping: a wrapped sequence would let a journal appear ordered while replaying earlier positions.
pub fn follows(self, previous: Self) -> bool
pub fn is_first(self) -> bool
Trait Implementations§
Source§impl Clone for AuditSequence
impl Clone for AuditSequence
Source§fn clone(&self) -> AuditSequence
fn clone(&self) -> AuditSequence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AuditSequence
Source§impl Debug for AuditSequence
impl Debug for AuditSequence
Source§impl<'de> Deserialize<'de> for AuditSequence
impl<'de> Deserialize<'de> for AuditSequence
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AuditSequence
Source§impl Hash for AuditSequence
impl Hash for AuditSequence
Source§impl Ord for AuditSequence
impl Ord for AuditSequence
Source§fn cmp(&self, other: &AuditSequence) -> Ordering
fn cmp(&self, other: &AuditSequence) -> Ordering
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for AuditSequence
impl PartialEq for AuditSequence
Source§impl PartialOrd for AuditSequence
impl PartialOrd for AuditSequence
Source§impl Serialize for AuditSequence
impl Serialize for AuditSequence
impl StructuralPartialEq for AuditSequence
Auto Trait Implementations§
impl Freeze for AuditSequence
impl RefUnwindSafe for AuditSequence
impl Send for AuditSequence
impl Sync for AuditSequence
impl Unpin for AuditSequence
impl UnsafeUnpin for AuditSequence
impl UnwindSafe for AuditSequence
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