pub struct DropPrefix {
pub keep_tail: usize,
}Expand description
Drop oldest messages via select_compaction_range (tool-safe).
Fields§
§keep_tail: usizeMessages to keep at the tail (including system when present).
Implementations§
Trait Implementations§
Source§impl Clone for DropPrefix
impl Clone for DropPrefix
Source§fn clone(&self) -> DropPrefix
fn clone(&self) -> DropPrefix
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 CompactionStrategy for DropPrefix
impl CompactionStrategy for DropPrefix
Source§fn should_compact(&self, messages: &[Message], _token_estimate: u64) -> bool
fn should_compact(&self, messages: &[Message], _token_estimate: u64) -> bool
Whether compaction should run given current size estimates.
Source§fn compact(
&self,
messages: Vec<Message>,
) -> Result<CompactionOutcome, MachiError>
fn compact( &self, messages: Vec<Message>, ) -> Result<CompactionOutcome, MachiError>
Produce a compacted message list. Read more
impl Copy for DropPrefix
Auto Trait Implementations§
impl Freeze for DropPrefix
impl RefUnwindSafe for DropPrefix
impl Send for DropPrefix
impl Sync for DropPrefix
impl Unpin for DropPrefix
impl UnsafeUnpin for DropPrefix
impl UnwindSafe for DropPrefix
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