pub struct TemporallyDecayedResult {
pub id: String,
pub semantic_score: f32,
pub decay_factor: f32,
pub final_score: f32,
pub timestamp: f64,
pub age_secs: f64,
}Expand description
A result with temporal decay applied
Fields§
§id: StringResult identifier
semantic_score: f32Original semantic/similarity score
decay_factor: f32Decay factor based on age
final_score: f32Final blended score
timestamp: f64Document timestamp (seconds since epoch)
age_secs: f64Age of the document
Implementations§
Source§impl TemporallyDecayedResult
impl TemporallyDecayedResult
Sourcepub fn new(
id: String,
semantic_score: f32,
timestamp: f64,
scorer: &TemporalScorer,
) -> TemporallyDecayedResult
pub fn new( id: String, semantic_score: f32, timestamp: f64, scorer: &TemporalScorer, ) -> TemporallyDecayedResult
Create from components
Sourcepub fn age_display(&self) -> String
pub fn age_display(&self) -> String
Format age as human-readable string
Trait Implementations§
Source§impl Clone for TemporallyDecayedResult
impl Clone for TemporallyDecayedResult
Source§fn clone(&self) -> TemporallyDecayedResult
fn clone(&self) -> TemporallyDecayedResult
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 moreAuto Trait Implementations§
impl Freeze for TemporallyDecayedResult
impl RefUnwindSafe for TemporallyDecayedResult
impl Send for TemporallyDecayedResult
impl Sync for TemporallyDecayedResult
impl Unpin for TemporallyDecayedResult
impl UnsafeUnpin for TemporallyDecayedResult
impl UnwindSafe for TemporallyDecayedResult
Blanket Implementations§
impl<T> Allocation for T
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,
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