pub struct PropHalfLife {
pub prop: String,
pub per_value: Vec<(String, i64)>,
pub default_ms: i64,
}Expand description
Per-node recency half-life keyed by a string prop (e.g. a memory’s
kind): a node whose prop value matches a per_value entry decays on
that entry’s half-life; absent, non-string, or unmatched values fall to
default_ms. None on SearchOptions keeps the flat
recency_half_life_ms — the engine stays agnostic about what the prop
means; callers supply the map (see topodb-json’s kind constants).
Fields§
§prop: StringThe Str prop to key decay on (e.g. a memory’s kind).
per_value: Vec<(String, i64)>(prop value, half-life ms) pairs, linear-scanned per candidate —
intended for small maps (a handful of kinds, not an open vocabulary).
default_ms: i64Half-life used when prop is absent, non-Str, or matches no
per_value entry.
Trait Implementations§
Source§impl Clone for PropHalfLife
impl Clone for PropHalfLife
Source§fn clone(&self) -> PropHalfLife
fn clone(&self) -> PropHalfLife
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 PropHalfLife
impl RefUnwindSafe for PropHalfLife
impl Send for PropHalfLife
impl Sync for PropHalfLife
impl Unpin for PropHalfLife
impl UnsafeUnpin for PropHalfLife
impl UnwindSafe for PropHalfLife
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