pub struct CompactionState { /* private fields */ }Expand description
Internal compaction state guarded by the Compactor mutex.
Implementations§
Source§impl CompactionState
impl CompactionState
Sourcepub fn from_parts(
entries: Vec<TurnEntry>,
critical: Vec<String>,
memory: String,
last_audit_seq: u64,
) -> Self
pub fn from_parts( entries: Vec<TurnEntry>, critical: Vec<String>, memory: String, last_audit_seq: u64, ) -> Self
Builds a state from previously Compactor::exported or persisted
parts (e.g. a DB snapshot row). The fields stay private so callers
cannot construct inconsistent internal states by hand.
Sourcepub fn last_audit_seq(&self) -> u64
pub fn last_audit_seq(&self) -> u64
Sequence number the last completed audit covered (for persistence).
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 (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 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
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