pub struct SimilarHit {
pub id: EmbeddingId,
pub score: f32,
pub kind: RecordKind,
pub source_id: SourceId,
pub timestamp_ns: u64,
}Expand description
One hit returned by RfMemoryStore::query_similar.
Fields§
§id: EmbeddingIdId of the matched stored embedding.
score: f32Cosine similarity to the query in [-1.0, 1.0].
kind: RecordKindWhether the matched record was a window or an event.
source_id: SourceIdSource the matched record came from.
timestamp_ns: u64Timestamp of the matched record (ns).
Trait Implementations§
Source§impl Clone for SimilarHit
impl Clone for SimilarHit
Source§fn clone(&self) -> SimilarHit
fn clone(&self) -> SimilarHit
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 moreSource§impl Debug for SimilarHit
impl Debug for SimilarHit
Source§impl<'de> Deserialize<'de> for SimilarHit
impl<'de> Deserialize<'de> for SimilarHit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SimilarHit
impl PartialEq for SimilarHit
Source§fn eq(&self, other: &SimilarHit) -> bool
fn eq(&self, other: &SimilarHit) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SimilarHit
impl Serialize for SimilarHit
impl StructuralPartialEq for SimilarHit
Auto Trait Implementations§
impl Freeze for SimilarHit
impl RefUnwindSafe for SimilarHit
impl Send for SimilarHit
impl Sync for SimilarHit
impl Unpin for SimilarHit
impl UnsafeUnpin for SimilarHit
impl UnwindSafe for SimilarHit
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