pub struct NearestResult {
pub id: String,
pub category: String,
pub distance: f64,
pub certainty: f64,
pub intensity: f64,
pub quality: Option<QualitySignal>,
}Expand description
One item returned from a nearest-neighbor or similarity query.
All fields use the pipeline’s configured projection to derive distances and quality signals; callers should treat results as comparable within a single pipeline but not across pipelines with different projection kinds.
Fields§
§id: StringItem id as supplied to SphereQLPipeline::new.
category: StringCategory label from the input.
distance: f64Angular distance on S² between the query and this item’s projected position, in radians.
certainty: f64Certainty of this point’s projection (0–1). Higher = more faithfully represented.
intensity: f64Semantic intensity (pre-normalization magnitude of original embedding).
quality: Option<QualitySignal>Combined quality signal: EVR × certainty × gap_confidence.
Always Some(...) for results the pipeline produces today; the
Option is kept so callers that construct NearestResult
outside the pipeline (e.g. mocks, tests) can omit it.
Trait Implementations§
Source§impl Clone for NearestResult
impl Clone for NearestResult
Source§fn clone(&self) -> NearestResult
fn clone(&self) -> NearestResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for NearestResult
impl RefUnwindSafe for NearestResult
impl Send for NearestResult
impl Sync for NearestResult
impl Unpin for NearestResult
impl UnsafeUnpin for NearestResult
impl UnwindSafe for NearestResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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