pub struct FilterFold<L, S, F, P>{ /* private fields */ }Expand description
Filter fold — only process entries matching a predicate.
Implementations§
Trait Implementations§
Source§impl<L, S, F, P> Fold<L, S> for FilterFold<L, S, F, P>
impl<L, S, F, P> Fold<L, S> for FilterFold<L, S, F, P>
Source§fn initial(&self, context: &FoldContext) -> S
fn initial(&self, context: &FoldContext) -> S
Get the initial state before any entries are processed.
Source§fn step(&self, state: S, entry: &L, context: &FoldContext) -> S
fn step(&self, state: S, entry: &L, context: &FoldContext) -> S
Process a single entry and return the new state. Read more
Source§fn finalize(&self, state: S, context: &FoldContext) -> S
fn finalize(&self, state: S, context: &FoldContext) -> S
Finalize the state after all entries are processed. Read more
Source§fn derive<'a, I>(&self, entries: I, context: &FoldContext) -> FoldOutcome<S>
fn derive<'a, I>(&self, entries: I, context: &FoldContext) -> FoldOutcome<S>
Derive state from an iterator of entries. Read more
Source§fn derive_filtered<'a, I, F>(
&self,
entries: I,
context: &FoldContext,
filter: F,
) -> FoldOutcome<S>
fn derive_filtered<'a, I, F>( &self, entries: I, context: &FoldContext, filter: F, ) -> FoldOutcome<S>
Derive state with a filter.
Auto Trait Implementations§
impl<L, S, F, P> Freeze for FilterFold<L, S, F, P>
impl<L, S, F, P> RefUnwindSafe for FilterFold<L, S, F, P>
impl<L, S, F, P> Send for FilterFold<L, S, F, P>
impl<L, S, F, P> Sync for FilterFold<L, S, F, P>
impl<L, S, F, P> Unpin for FilterFold<L, S, F, P>
impl<L, S, F, P> UnsafeUnpin for FilterFold<L, S, F, P>where
F: UnsafeUnpin,
P: UnsafeUnpin,
impl<L, S, F, P> UnwindSafe for FilterFold<L, S, F, P>
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