pub struct FingerprintSnapshot { /* private fields */ }Expand description
One immutable fingerprint value captured at a semantic revision.
Implementations§
Source§impl FingerprintSnapshot
impl FingerprintSnapshot
Sourcepub fn new(
algorithm: impl Into<String>,
version: u16,
value: Vec<u8>,
observed_revision_sequence: Option<u64>,
) -> Result<Self>
pub fn new( algorithm: impl Into<String>, version: u16, value: Vec<u8>, observed_revision_sequence: Option<u64>, ) -> Result<Self>
Creates a validated snapshot of one fingerprint domain.
observed_revision_sequence is absent for fingerprints migrated from a
schema that did not record observation revisions.
§Errors
Returns an error when the fingerprint algorithm or value is invalid.
Sourcepub const fn observed_revision_sequence(&self) -> Option<u64>
pub const fn observed_revision_sequence(&self) -> Option<u64>
Returns the revision that recorded this value, when known.
Trait Implementations§
Source§impl Clone for FingerprintSnapshot
impl Clone for FingerprintSnapshot
Source§fn clone(&self) -> FingerprintSnapshot
fn clone(&self) -> FingerprintSnapshot
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 moreSource§impl Debug for FingerprintSnapshot
impl Debug for FingerprintSnapshot
impl Eq for FingerprintSnapshot
Source§impl Ord for FingerprintSnapshot
impl Ord for FingerprintSnapshot
Source§fn cmp(&self, other: &FingerprintSnapshot) -> Ordering
fn cmp(&self, other: &FingerprintSnapshot) -> 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
Source§impl PartialEq for FingerprintSnapshot
impl PartialEq for FingerprintSnapshot
Source§impl PartialOrd for FingerprintSnapshot
impl PartialOrd for FingerprintSnapshot
impl StructuralPartialEq for FingerprintSnapshot
Auto Trait Implementations§
impl Freeze for FingerprintSnapshot
impl RefUnwindSafe for FingerprintSnapshot
impl Send for FingerprintSnapshot
impl Sync for FingerprintSnapshot
impl Unpin for FingerprintSnapshot
impl UnsafeUnpin for FingerprintSnapshot
impl UnwindSafe for FingerprintSnapshot
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