pub enum RetentionRule {
KeepAll,
LastN {
n: usize,
},
MaxAgeMs {
max_age_ms: u64,
},
PerAgentWithAge {
max_per_agent: usize,
max_age_ms: u64,
},
}Expand description
How one surface’s checkpoint retention trims — the proposal’s table rows.
Variants§
KeepAll
Keep everything (knowledge/skills — “the valuable distilled state” — and forced for event-stream surfaces).
LastN
Keep the last n entries by payload "timestamp" (conversations —
“last N turns by timestamp (= today’s max_turns)”).
MaxAgeMs
Keep entries no older than max_age_ms relative to the compaction’s
as_of_ms (trajectories — “last D days”).
PerAgentWithAge
Keep the most recent max_per_agent per payload "agent_id" AND
drop anything older than max_age_ms — both restrictive, the
RunStore::gc rule (runs — “50 / agent + 30 days”).
Trait Implementations§
Source§impl Clone for RetentionRule
impl Clone for RetentionRule
Source§fn clone(&self) -> RetentionRule
fn clone(&self) -> RetentionRule
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 RetentionRule
impl Debug for RetentionRule
Source§impl<'de> Deserialize<'de> for RetentionRule
impl<'de> Deserialize<'de> for RetentionRule
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 RetentionRule
Source§impl PartialEq for RetentionRule
impl PartialEq for RetentionRule
Source§fn eq(&self, other: &RetentionRule) -> bool
fn eq(&self, other: &RetentionRule) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for RetentionRule
impl Serialize for RetentionRule
impl StructuralPartialEq for RetentionRule
Auto Trait Implementations§
impl Freeze for RetentionRule
impl RefUnwindSafe for RetentionRule
impl Send for RetentionRule
impl Sync for RetentionRule
impl Unpin for RetentionRule
impl UnsafeUnpin for RetentionRule
impl UnwindSafe for RetentionRule
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