pub struct SearchHit {
pub memory: Memory,
pub similarity: f32,
}Expand description
A scored semantic-search hit: the matched Memory plus its cosine
similarity to the query (0.0–1.0, higher = more relevant).
Required both for cross-namespace result merging (the pi integration’s
scope=visible search) and for downstream “% match” display.
Fields§
§memory: MemoryThe matched memory.
similarity: f32Cosine similarity to the query (0.0–1.0).
Trait Implementations§
impl StructuralPartialEq for SearchHit
Auto Trait Implementations§
impl Freeze for SearchHit
impl RefUnwindSafe for SearchHit
impl Send for SearchHit
impl Sync for SearchHit
impl Unpin for SearchHit
impl UnsafeUnpin for SearchHit
impl UnwindSafe for SearchHit
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