pub enum RetentionClass {
Hot,
Warm,
AuditArchive,
}Expand description
Named data-retention class from @store(class:).
A retention class is an operator-facing handle for a canonical
eviction window: rather than computing evictAfter in raw seconds, a
schema declares @store(class: "hot") and the loader resolves the
class to the seconds value that populates
StoreConfig::evict_after. From that point the existing TTL
machinery does the rest — the per-record expiration header and the
yeti.expiration_filter compaction filter reclaim aged records with
no class-specific reclaim code.
The canonical durations are fixed by this enum so a class means the
same window across every table and every deployment. A schema that
needs a non-canonical window keeps using raw @store(evictAfter: N);
the two are mutually exclusive (declaring both is a schema error).
Variants§
Hot
"hot" — 30 days. Operational data with a short useful life:
recent events, session-scoped state, ephemeral caches that still
want crash durability.
Warm
"warm" — 90 days. Data kept for a quarter: rolling analytics
windows, recent history surfaced in dashboards.
AuditArchive
"audit-archive" — 7 years (2557 days). Compliance-retained
records: audit logs, financial records, anything under a
multi-year statutory hold.
Implementations§
Source§impl RetentionClass
impl RetentionClass
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
Parse a @store(class:) string. Case-insensitive; the
audit-archive class also accepts the audit_archive spelling so
either separator works in a schema file.
Sourcepub const fn evict_after_secs(self) -> u64
pub const fn evict_after_secs(self) -> u64
The canonical eviction window for this class, in seconds. This is
the value routed into StoreConfig::evict_after, so a
class-tagged table flows through the identical TTL + compaction
path as a raw evictAfter.
Trait Implementations§
Source§impl Clone for RetentionClass
impl Clone for RetentionClass
Source§fn clone(&self) -> RetentionClass
fn clone(&self) -> RetentionClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RetentionClass
Source§impl Debug for RetentionClass
impl Debug for RetentionClass
Source§impl<'de> Deserialize<'de> for RetentionClass
impl<'de> Deserialize<'de> for RetentionClass
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>,
impl Eq for RetentionClass
Source§impl Hash for RetentionClass
impl Hash for RetentionClass
Source§impl Ord for RetentionClass
impl Ord for RetentionClass
Source§fn cmp(&self, other: &RetentionClass) -> Ordering
fn cmp(&self, other: &RetentionClass) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RetentionClass
impl PartialEq for RetentionClass
Source§fn eq(&self, other: &RetentionClass) -> bool
fn eq(&self, other: &RetentionClass) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RetentionClass
impl PartialOrd for RetentionClass
Source§impl Serialize for RetentionClass
impl Serialize for RetentionClass
impl StructuralPartialEq for RetentionClass
Auto Trait Implementations§
impl Freeze for RetentionClass
impl RefUnwindSafe for RetentionClass
impl Send for RetentionClass
impl Sync for RetentionClass
impl Unpin for RetentionClass
impl UnsafeUnpin for RetentionClass
impl UnwindSafe for RetentionClass
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.