pub struct FrameHashStore { /* private fields */ }Expand description
In-memory store of FrameHash values supporting similarity search.
Implementations§
Source§impl FrameHashStore
impl FrameHashStore
Sourcepub fn insert(&mut self, hash: FrameHash)
pub fn insert(&mut self, hash: FrameHash)
Insert a FrameHash into the store, keyed by its frame_index.
Sourcepub fn find_similar(
&self,
query: &FrameHash,
max_distance: u32,
) -> Vec<(u64, u32)>
pub fn find_similar( &self, query: &FrameHash, max_distance: u32, ) -> Vec<(u64, u32)>
Find all hashes within max_distance of query.
Returns a Vec of (frame_index, distance) pairs sorted by distance.
Trait Implementations§
Source§impl Debug for FrameHashStore
impl Debug for FrameHashStore
Source§impl Default for FrameHashStore
impl Default for FrameHashStore
Source§fn default() -> FrameHashStore
fn default() -> FrameHashStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FrameHashStore
impl RefUnwindSafe for FrameHashStore
impl Send for FrameHashStore
impl Sync for FrameHashStore
impl Unpin for FrameHashStore
impl UnsafeUnpin for FrameHashStore
impl UnwindSafe for FrameHashStore
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> 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