pub enum TTL {
Persistent,
Session,
Scope,
Duration(DurationMs),
Ephemeral,
ShortTerm,
MediumTerm,
LongTerm,
Permanent,
Max(usize),
}Expand description
Time-to-live and retention configuration for memory entries. Supports both time-based expiration and count-based limits.
Variants§
Persistent
Never expires
Session
Expires when session ends
Scope
Expires when scope closes
Duration(DurationMs)
Expires after specified duration in milliseconds
Ephemeral
Ephemeral - expires when scope closes (alias for Scope)
ShortTerm
Short-term retention (~1 hour)
MediumTerm
Medium-term retention (~24 hours)
LongTerm
Long-term retention (~7 days)
Permanent
Permanent - never expires (alias for Persistent)
Max(usize)
Keep at most N entries (count-based retention from pack config)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TTL
impl<'de> Deserialize<'de> for TTL
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
impl Eq for TTL
impl StructuralPartialEq for TTL
Auto Trait Implementations§
impl Freeze for TTL
impl RefUnwindSafe for TTL
impl Send for TTL
impl Sync for TTL
impl Unpin for TTL
impl UnwindSafe for TTL
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.