pub struct RankScore(pub f64);Expand description
Ranker-agnostic score produced by hybrid search.
Scores are ranker-specific (RRF, cosine, BM25, …) and should not be compared across different ranking algorithms. This newtype prevents accidental comparison between ranker-internal score ranges (e.g. RRF 0.0–~0.03 vs. cosine 0.0–1.0).
NaN-safe: RankScore(f64::NAN) compares equal to itself and sorts
before all finite values, matching f64::total_cmp semantics.
Tuple Fields§
§0: f64Trait Implementations§
impl Copy for RankScore
Source§impl PartialOrd for RankScore
impl PartialOrd for RankScore
Source§impl PartialOrd<f64> for RankScore
impl PartialOrd<f64> for RankScore
Auto Trait Implementations§
impl Freeze for RankScore
impl RefUnwindSafe for RankScore
impl Send for RankScore
impl Sync for RankScore
impl Unpin for RankScore
impl UnsafeUnpin for RankScore
impl UnwindSafe for RankScore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> 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>
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