pub struct SimHashV1 { /* private fields */ }Expand description
A simhash-v1 hash being built a feature at a time, for features that arrive in parts.
simhash_v1 holds the definition.
use legit_hashes::{SimHashV1, simhash_v1, words_v1};
let mut hash = SimHashV1::new();
for word in words_v1("Hello, world") {
hash.add(word, 1);
}
assert_eq!(hash.finish(), simhash_v1([("hello", 1), ("world", 1)]));Implementations§
Trait Implementations§
impl Eq for SimHashV1
impl StructuralPartialEq for SimHashV1
Auto Trait Implementations§
impl Forget for SimHashV1
impl Freeze for SimHashV1
impl Move for SimHashV1
impl RefUnwindSafe for SimHashV1
impl Send for SimHashV1
impl Sync for SimHashV1
impl Unpin for SimHashV1
impl UnsafeUnpin for SimHashV1
impl UnwindSafe for SimHashV1
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