Skip to main content

Fingerprint

Trait Fingerprint 

Source
pub trait Fingerprint:
    Send
    + Sync
    + 'static {
    type Stamp: Eq + Hash + Clone + Send + Sync + Debug + 'static;

    // Required method
    fn stamp(&self, path: &Path) -> Result<Self::Stamp>;
}
Expand description

Cheaply identifies whether a file’s content has changed since the last parse.

Required Associated Types§

Source

type Stamp: Eq + Hash + Clone + Send + Sync + Debug + 'static

Opaque stamp that can be compared for equality and hashed.

Required Methods§

Source

fn stamp(&self, path: &Path) -> Result<Self::Stamp>

Compute the current stamp for path. Returns Err if the file is unreadable (missing, permissions, etc.) — the cache treats this as a miss that produces the caller’s error.

Implementors§