pub struct BatchOutputs { /* private fields */ }Expand description
Output packets grouped by declared output port.
Implementations§
Source§impl BatchOutputs
impl BatchOutputs
Sourcepub fn from_packets(
packets_by_port: impl Into<BTreeMap<PortId, Vec<PortPacket>>>,
) -> Self
pub fn from_packets( packets_by_port: impl Into<BTreeMap<PortId, Vec<PortPacket>>>, ) -> Self
Create an output batch from port-grouped packets.
Sourcepub fn push(&mut self, port_id: PortId, packet: PortPacket)
pub fn push(&mut self, port_id: PortId, packet: PortPacket)
Add one packet to the batch for a port.
Sourcepub fn packets(&self, port_id: &PortId) -> &[PortPacket] ⓘ
pub fn packets(&self, port_id: &PortId) -> &[PortPacket] ⓘ
Borrow all packets for one port.
Sourcepub const fn packets_by_port(&self) -> &BTreeMap<PortId, Vec<PortPacket>>
pub const fn packets_by_port(&self) -> &BTreeMap<PortId, Vec<PortPacket>>
Borrow the full port-to-packets map.
Sourcepub fn into_packets_by_port(self) -> BTreeMap<PortId, Vec<PortPacket>>
pub fn into_packets_by_port(self) -> BTreeMap<PortId, Vec<PortPacket>>
Consume the batch into the full port-to-packets map.
Trait Implementations§
Source§impl Clone for BatchOutputs
impl Clone for BatchOutputs
Source§fn clone(&self) -> BatchOutputs
fn clone(&self) -> BatchOutputs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BatchOutputs
impl Debug for BatchOutputs
Source§impl Default for BatchOutputs
impl Default for BatchOutputs
Source§fn default() -> BatchOutputs
fn default() -> BatchOutputs
Returns the “default value” for a type. Read more
Source§impl PartialEq for BatchOutputs
impl PartialEq for BatchOutputs
Source§fn eq(&self, other: &BatchOutputs) -> bool
fn eq(&self, other: &BatchOutputs) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for BatchOutputs
impl StructuralPartialEq for BatchOutputs
Auto Trait Implementations§
impl Freeze for BatchOutputs
impl RefUnwindSafe for BatchOutputs
impl Send for BatchOutputs
impl Sync for BatchOutputs
impl Unpin for BatchOutputs
impl UnsafeUnpin for BatchOutputs
impl UnwindSafe for BatchOutputs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).