pub struct DecayPolicy { /* private fields */ }Expand description
Governs how memory importance decays over time.
Implementations§
Source§impl DecayPolicy
impl DecayPolicy
Sourcepub fn exponential(half_life_hours: f64) -> Result<Self, AgentRuntimeError>
pub fn exponential(half_life_hours: f64) -> Result<Self, AgentRuntimeError>
Sourcepub fn decay_item(&self, item: &mut MemoryItem)
pub fn decay_item(&self, item: &mut MemoryItem)
Apply decay in-place to a mutable MemoryItem.
Trait Implementations§
Source§impl Clone for DecayPolicy
impl Clone for DecayPolicy
Source§fn clone(&self) -> DecayPolicy
fn clone(&self) -> DecayPolicy
Returns a duplicate of the value. Read more
1.0.0 · 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 DecayPolicy
impl RefUnwindSafe for DecayPolicy
impl Send for DecayPolicy
impl Sync for DecayPolicy
impl Unpin for DecayPolicy
impl UnsafeUnpin for DecayPolicy
impl UnwindSafe for DecayPolicy
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