pub struct Fingerprint {
pub len: u64,
pub modified: Option<SystemTime>,
pub identity: FileIdentity,
pub observed: SystemTime,
pub content: ContentHash,
}Expand description
What a regular file looked like when it was read: its stat fields, the
moment that stat was taken, and a fingerprint_bytes hash of its
contents.
Fields§
§len: u64File size in bytes.
modified: Option<SystemTime>Modification time, when the platform reports one.
identity: FileIdentityInode-level identity; all fields are None off Unix.
observed: SystemTimeWhen the stat was taken.
content: ContentHashHash of the bytes that were read.
Implementations§
Source§impl Fingerprint
impl Fingerprint
fn stat_matches(&self, metadata: &Metadata) -> bool
Sourcepub fn is_racy(&self) -> bool
pub fn is_racy(&self) -> bool
Whether the file was modified within RACY_WINDOW of the moment the
fingerprint was taken, or has no modification time at all, so a
matching stat is not proof that the contents are unchanged.
Trait Implementations§
Source§impl Clone for Fingerprint
impl Clone for Fingerprint
Source§fn clone(&self) -> Fingerprint
fn clone(&self) -> Fingerprint
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 Fingerprint
Source§impl Debug for Fingerprint
impl Debug for Fingerprint
impl Eq for Fingerprint
Source§impl PartialEq for Fingerprint
impl PartialEq for Fingerprint
Source§fn eq(&self, other: &Fingerprint) -> bool
fn eq(&self, other: &Fingerprint) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Fingerprint
Auto Trait Implementations§
impl Freeze for Fingerprint
impl RefUnwindSafe for Fingerprint
impl Send for Fingerprint
impl Sync for Fingerprint
impl Unpin for Fingerprint
impl UnsafeUnpin for Fingerprint
impl UnwindSafe for Fingerprint
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