pub struct PrunePolicy {
pub max_age_days: u32,
pub min_importance_to_keep: f32,
pub max_items: usize,
}Expand description
Policy controlling automatic pruning of long-term memory.
Fields§
§max_age_days: u32Items older than this many days AND below min_importance_to_keep are deleted (default: 90).
min_importance_to_keep: f32Items with importance below this threshold are eligible for age-based deletion (default: 0.5). High-importance items are never age-pruned.
max_items: usizeHard cap on total items; when exceeded, lowest-relevance items are removed. 0 means unlimited (default: 0).
Trait Implementations§
Source§impl Clone for PrunePolicy
impl Clone for PrunePolicy
Source§fn clone(&self) -> PrunePolicy
fn clone(&self) -> PrunePolicy
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 moreSource§impl Debug for PrunePolicy
impl Debug for PrunePolicy
Source§impl Default for PrunePolicy
impl Default for PrunePolicy
Source§impl<'de> Deserialize<'de> for PrunePolicy
impl<'de> Deserialize<'de> for PrunePolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PrunePolicy
impl RefUnwindSafe for PrunePolicy
impl Send for PrunePolicy
impl Sync for PrunePolicy
impl Unpin for PrunePolicy
impl UnsafeUnpin for PrunePolicy
impl UnwindSafe for PrunePolicy
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