pub enum ProtectionLevel {
None = 0,
Low = 1,
Medium = 2,
High = 3,
Permanent = 4,
}Expand description
Auto-protection level. Users never need to know about this.
Variants§
None = 0
No protection. Normal decay + deletion.
Low = 1
Slow decay, deletion possible. Trigger: 2+ accesses.
Medium = 2
Very slow decay. Deletion only after retention_days × 2. Trigger: 3+ accesses or 2+ session appearances.
High = 3
Near-permanent. Preserved in LLM compaction. Trigger: 5+ accesses, 3+ sessions, or user “remember this”.
Permanent = 4
Absolute protection. Never deleted or compressed. Trigger: UserProfile/Preference type, or explicit user pin.
Implementations§
Source§impl ProtectionLevel
impl ProtectionLevel
Sourcepub fn decay_multiplier(&self) -> f32
pub fn decay_multiplier(&self) -> f32
Decay multiplier based on protection level.
Trait Implementations§
Source§impl Clone for ProtectionLevel
impl Clone for ProtectionLevel
Source§fn clone(&self) -> ProtectionLevel
fn clone(&self) -> ProtectionLevel
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 moreimpl Copy for ProtectionLevel
Source§impl Debug for ProtectionLevel
impl Debug for ProtectionLevel
Source§impl Default for ProtectionLevel
impl Default for ProtectionLevel
Source§fn default() -> ProtectionLevel
fn default() -> ProtectionLevel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProtectionLevel
impl<'de> Deserialize<'de> for ProtectionLevel
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProtectionLevel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProtectionLevel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProtectionLevel
Source§impl Ord for ProtectionLevel
impl Ord for ProtectionLevel
Source§fn cmp(&self, other: &ProtectionLevel) -> Ordering
fn cmp(&self, other: &ProtectionLevel) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ProtectionLevel
impl PartialEq for ProtectionLevel
Source§fn eq(&self, other: &ProtectionLevel) -> bool
fn eq(&self, other: &ProtectionLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ProtectionLevel
impl PartialOrd for ProtectionLevel
Source§impl Serialize for ProtectionLevel
impl Serialize for ProtectionLevel
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ProtectionLevel
Auto Trait Implementations§
impl Freeze for ProtectionLevel
impl RefUnwindSafe for ProtectionLevel
impl Send for ProtectionLevel
impl Sync for ProtectionLevel
impl Unpin for ProtectionLevel
impl UnsafeUnpin for ProtectionLevel
impl UnwindSafe for ProtectionLevel
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
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.