pub struct SstFilter(/* private fields */);Implementations§
Source§impl SstFilter
impl SstFilter
pub fn new() -> Self
Sourcepub fn apply_filter(&mut self, meta: &mut MetaFile)
pub fn apply_filter(&mut self, meta: &mut MetaFile)
Phase 1: Apply the filter to the meta file and update the state in the filter.
Sourcepub fn apply_filter_collect(&mut self, meta: &MetaFile) -> FxHashSet<u32>
pub fn apply_filter_collect(&mut self, meta: &MetaFile) -> FxHashSet<u32>
Like apply_filter but only updates the filter state without
modifying the MetaFile. Returns the set of SST sequence numbers that should be removed
from this meta file’s entries (they are superseded by a newer meta). Call
meta.retain_entries(|seq| !obsolete.contains(&seq)) later to apply.
Sourcepub fn apply_and_get_remove(&mut self, meta: &MetaFile) -> bool
pub fn apply_and_get_remove(&mut self, meta: &MetaFile) -> bool
Phase 2: Check if the meta file can be removed based on the filter state after phase 1. Updates the filter state for the next meta file. Returns true if the meta file can be removed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SstFilter
impl RefUnwindSafe for SstFilter
impl Send for SstFilter
impl Sync for SstFilter
impl Unpin for SstFilter
impl UnsafeUnpin for SstFilter
impl UnwindSafe for SstFilter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more