pub struct Inspect<B: Batch, F>{ /* private fields */ }Expand description
A batch that calls a closure on packets in the underlying batch, including ones that are already dropped, emitted or aborted.
Implementations§
Trait Implementations§
Source§impl<B: Batch, F> Batch for Inspect<B, F>
impl<B: Batch, F> Batch for Inspect<B, F>
Source§fn next(&mut self) -> Option<Disposition<Self::Item>>
fn next(&mut self) -> Option<Disposition<Self::Item>>
Returns the disposition of the next packet in the batch. Read more
Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Creates a batch that uses a predicate to determine if a packet
should be processed or dropped. If the predicate evaluates to
false,
the packet is marked as dropped. Read moreSource§fn filter_map<T: Packet, F>(self, f: F) -> FilterMap<Self, T, F>
fn filter_map<T: Packet, F>(self, f: F) -> FilterMap<Self, T, F>
Source§fn map<T: Packet, F>(self, f: F) -> Map<Self, T, F>
fn map<T: Packet, F>(self, f: F) -> Map<Self, T, F>
Creates a batch that maps the packets to another packet type. Read more
Source§fn for_each<F>(self, f: F) -> ForEach<Self, F>
fn for_each<F>(self, f: F) -> ForEach<Self, F>
Calls a closure on each packet of the batch. Read more
Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Calls a closure on each packet of the batch, including ones that are
already dropped, emitted or aborted. Read more
Source§fn group_by<D, S, C>(self, selector: S, composer: C) -> GroupBy<Self, D, S>
fn group_by<D, S, C>(self, selector: S, composer: C) -> GroupBy<Self, D, S>
Splits the packets into multiple sub batches. Each sub batch runs
through a separate pipeline, and are then merged back together. Read more
Source§fn replace<T: Packet, F>(self, f: F) -> Replace<Self, T, F>
fn replace<T: Packet, F>(self, f: F) -> Replace<Self, T, F>
A batch that replaces each packet with another packet. Read more
Auto Trait Implementations§
impl<B, F> Freeze for Inspect<B, F>
impl<B, F> RefUnwindSafe for Inspect<B, F>where
B: RefUnwindSafe,
F: RefUnwindSafe,
impl<B, F> Send for Inspect<B, F>
impl<B, F> Sync for Inspect<B, F>
impl<B, F> Unpin for Inspect<B, F>
impl<B, F> UnsafeUnpin for Inspect<B, F>where
B: UnsafeUnpin,
F: UnsafeUnpin,
impl<B, F> UnwindSafe for Inspect<B, F>where
B: UnwindSafe,
F: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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