pub struct Fingerprint {
pub whole: Hash256,
pub windows: Vec<WindowFp>,
}Expand description
A whole-document fingerprint plus overlapping window fingerprints.
Fields§
§whole: Hash256§windows: Vec<WindowFp>Implementations§
Source§impl Fingerprint
impl Fingerprint
Sourcepub fn best_distance(&self, candidate: &Hash256) -> u32
pub fn best_distance(&self, candidate: &Hash256) -> u32
The best (smallest) Hamming distance from candidate’s whole-document
hash to this fingerprint’s whole hash or any of its window hashes.
Sourcepub fn matches(&self, candidate: &Hash256) -> bool
pub fn matches(&self, candidate: &Hash256) -> bool
Whether candidate’s whole-document hash matches this fingerprint
(whole or any window) within MATCH_THRESHOLD.
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 moreAuto 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