pub struct Filter<P, N> { /* private fields */ }Expand description
filter: drop records failing the predicate. A drop releases the
record’s ack share — it counts as success for the batch.
Trait Implementations§
Source§impl<P, N> StageLifecycle for Filter<P, N>where
N: StageLifecycle,
impl<P, N> StageLifecycle for Filter<P, N>where
N: StageLifecycle,
Source§fn on_batch_end(&mut self, elapsed: Duration)
fn on_batch_end(&mut self, elapsed: Duration)
Flush per-batch metric accumulators.
elapsed is the chain-level
batch duration: per-stage attribution inside one inlined loop is
not measurable without per-record clocks, so every stage reports
the chain figure, keeping the histograms comparable.Source§fn take_fatal(&mut self) -> Option<FatalError>
fn take_fatal(&mut self) -> Option<FatalError>
Take the first fatal error recorded by any stage.
Source§fn relieve(&mut self) -> Flow
fn relieve(&mut self) -> Flow
Let the terminal stage drain parked output.
Flow::Blocked means
it is still backed up and the chain must not accept new payloads.Source§fn flush_terminal(&mut self) -> Flow
fn flush_terminal(&mut self) -> Flow
Seal and hand off all terminal buffers, partial chunks included.
Flow::Blocked means not everything could be sent; retry later.Auto Trait Implementations§
impl<P, N> Freeze for Filter<P, N>
impl<P, N> !RefUnwindSafe for Filter<P, N>
impl<P, N> Send for Filter<P, N>
impl<P, N> Sync for Filter<P, N>
impl<P, N> Unpin for Filter<P, N>
impl<P, N> UnsafeUnpin for Filter<P, N>where
P: UnsafeUnpin,
N: UnsafeUnpin,
impl<P, N> !UnwindSafe for Filter<P, N>
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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