pub trait ContentHasher: Send + Sync {
// Required method
fn hash_file(&self, path: &Path) -> Result<HashResult, InfraError>;
}Expand description
Pluggable content identity resolver.
Computes both generic file hash and format-specific content hash.
Required Methods§
Sourcefn hash_file(&self, path: &Path) -> Result<HashResult, InfraError>
fn hash_file(&self, path: &Path) -> Result<HashResult, InfraError>
Compute hashes for the given file.
file_hash is always computed. content_hash is computed
only for supported formats (e.g. PNG).