pub enum CompactionLevel {
Raw = 0,
Daily = 1,
Weekly = 2,
Monthly = 3,
Root = 4,
}Expand description
Compaction level in the compression hierarchy.
Variants§
Raw = 0
Raw session data (uncompressed).
Daily = 1
Daily summary (compressed from raw).
Weekly = 2
Weekly summary (compressed from weekly).
Monthly = 3
Monthly summary (compressed from weekly).
Root = 4
Root index entry (top-level summary).
Implementations§
Source§impl CompactionLevel
impl CompactionLevel
Sourcepub fn threshold(&self) -> usize
pub fn threshold(&self) -> usize
Line count threshold for triggering compaction at this level.
When content at this level exceeds the threshold, it becomes a candidate for promotion to the next level.
Sourcepub fn all() -> &'static [CompactionLevel]
pub fn all() -> &'static [CompactionLevel]
All levels in ascending order.
Sourcepub fn next(&self) -> Option<CompactionLevel>
pub fn next(&self) -> Option<CompactionLevel>
Get the next higher compaction level.
Returns None for Root (topmost level).
Trait Implementations§
Source§impl Clone for CompactionLevel
impl Clone for CompactionLevel
Source§fn clone(&self) -> CompactionLevel
fn clone(&self) -> CompactionLevel
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 CompactionLevel
Source§impl Debug for CompactionLevel
impl Debug for CompactionLevel
Source§impl<'de> Deserialize<'de> for CompactionLevel
impl<'de> Deserialize<'de> for CompactionLevel
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 CompactionLevel
Source§impl Ord for CompactionLevel
impl Ord for CompactionLevel
Source§fn cmp(&self, other: &CompactionLevel) -> Ordering
fn cmp(&self, other: &CompactionLevel) -> 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 CompactionLevel
impl PartialEq for CompactionLevel
Source§fn eq(&self, other: &CompactionLevel) -> bool
fn eq(&self, other: &CompactionLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for CompactionLevel
impl PartialOrd for CompactionLevel
Source§impl Serialize for CompactionLevel
impl Serialize for CompactionLevel
impl StructuralPartialEq for CompactionLevel
Auto Trait Implementations§
impl Freeze for CompactionLevel
impl RefUnwindSafe for CompactionLevel
impl Send for CompactionLevel
impl Sync for CompactionLevel
impl Unpin for CompactionLevel
impl UnsafeUnpin for CompactionLevel
impl UnwindSafe for CompactionLevel
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