#[non_exhaustive]pub struct VectorHit {
pub node_id: NodeId,
pub score: f32,
}Expand description
One scored match returned by a VectorIndex search.
#[non_exhaustive] keeps field adds backward-compatible for
downstream match sites; callers in sibling crates
(e.g. mnem-ann) build instances via VectorHit::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.node_id: NodeIdThe matched node’s stable identity.
score: f32Cosine similarity in [-1.0, 1.0]. Higher is closer.
Implementations§
Trait Implementations§
impl StructuralPartialEq for VectorHit
Auto Trait Implementations§
impl Freeze for VectorHit
impl RefUnwindSafe for VectorHit
impl Send for VectorHit
impl Sync for VectorHit
impl Unpin for VectorHit
impl UnsafeUnpin for VectorHit
impl UnwindSafe for VectorHit
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