pub struct FileFingerprint {
pub size: u64,
pub mtime_secs: i64,
pub chunk_count: usize,
pub content_hash: Option<String>,
}Expand description
Cheap fingerprint for change detection.
(size, mtime) is fast to compute and covers almost all real edits;
content_hash (BLAKE3 of the file bytes) is the fallback used by
incremental update when mtime drifts but the bytes haven’t changed
(touch, git checkout of an identical version, no-op formatter
runs).
Fields§
§size: u64File size in bytes.
mtime_secs: i64Modification time as Unix epoch seconds.
chunk_count: usizeNumber of chunks this file produced.
content_hash: Option<String>BLAKE3 hex digest of the file bytes. None for fingerprints
loaded from a pre-content-hash manifest; new fingerprints
always populate it.
Implementations§
Trait Implementations§
Source§impl Clone for FileFingerprint
impl Clone for FileFingerprint
Source§fn clone(&self) -> FileFingerprint
fn clone(&self) -> FileFingerprint
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 FileFingerprint
impl Debug for FileFingerprint
Source§impl<'de> Deserialize<'de> for FileFingerprint
impl<'de> Deserialize<'de> for FileFingerprint
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
Source§impl PartialEq for FileFingerprint
impl PartialEq for FileFingerprint
Source§fn eq(&self, other: &FileFingerprint) -> bool
fn eq(&self, other: &FileFingerprint) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FileFingerprint
impl Serialize for FileFingerprint
impl Eq for FileFingerprint
impl StructuralPartialEq for FileFingerprint
Auto Trait Implementations§
impl Freeze for FileFingerprint
impl RefUnwindSafe for FileFingerprint
impl Send for FileFingerprint
impl Sync for FileFingerprint
impl Unpin for FileFingerprint
impl UnsafeUnpin for FileFingerprint
impl UnwindSafe for FileFingerprint
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more