pub struct Emit<B: Batch, Tx: PacketTx> { /* private fields */ }Expand description
A batch that transmits the packets through the specified PacketTx.
Implementations§
Trait Implementations§
Source§impl<B: Batch, Tx: PacketTx> Batch for Emit<B, Tx>
impl<B: Batch, Tx: PacketTx> Batch for Emit<B, Tx>
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, Tx> Freeze for Emit<B, Tx>
impl<B, Tx> RefUnwindSafe for Emit<B, Tx>where
B: RefUnwindSafe,
Tx: RefUnwindSafe,
impl<B, Tx> Send for Emit<B, Tx>
impl<B, Tx> Sync for Emit<B, Tx>
impl<B, Tx> Unpin for Emit<B, Tx>
impl<B, Tx> UnsafeUnpin for Emit<B, Tx>where
B: UnsafeUnpin,
Tx: UnsafeUnpin,
impl<B, Tx> UnwindSafe for Emit<B, Tx>where
B: UnwindSafe,
Tx: 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