pub struct CompactionState {
pub boundaries: Vec<CompactionBoundary>,
pub total_compactions: u64,
}Expand description
Durable state for context compaction tracking.
Stores a history of compaction boundaries so that load-time trimming and plugin queries can identify already-summarized ranges.
Fields§
§boundaries: Vec<CompactionBoundary>Ordered list of compaction boundaries (most recent last).
total_compactions: u64Total number of compaction passes performed.
Implementations§
Source§impl CompactionState
impl CompactionState
Sourcepub fn latest_boundary(&self) -> Option<&CompactionBoundary>
pub fn latest_boundary(&self) -> Option<&CompactionBoundary>
Latest compaction boundary, if any.
Trait Implementations§
Source§impl Clone for CompactionState
impl Clone for CompactionState
Source§fn clone(&self) -> CompactionState
fn clone(&self) -> CompactionState
Returns a duplicate of the value. Read more
1.0.0 · 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 CompactionState
impl Debug for CompactionState
Source§impl Default for CompactionState
impl Default for CompactionState
Source§fn default() -> CompactionState
fn default() -> CompactionState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CompactionState
impl<'de> Deserialize<'de> for CompactionState
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
Source§impl PartialEq for CompactionState
impl PartialEq for CompactionState
Source§impl Serialize for CompactionState
impl Serialize for CompactionState
impl Eq for CompactionState
impl StructuralPartialEq for CompactionState
Auto Trait Implementations§
impl Freeze for CompactionState
impl RefUnwindSafe for CompactionState
impl Send for CompactionState
impl Sync for CompactionState
impl Unpin for CompactionState
impl UnsafeUnpin for CompactionState
impl UnwindSafe for CompactionState
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,
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.