pub struct BatchInputs { /* private fields */ }Expand description
Input packets grouped by declared input port.
Implementations§
Source§impl BatchInputs
impl BatchInputs
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 input 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 BatchInputs
impl Clone for BatchInputs
Source§fn clone(&self) -> BatchInputs
fn clone(&self) -> BatchInputs
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 BatchInputs
impl Debug for BatchInputs
Source§impl Default for BatchInputs
impl Default for BatchInputs
Source§fn default() -> BatchInputs
fn default() -> BatchInputs
Returns the “default value” for a type. Read more
Source§impl PartialEq for BatchInputs
impl PartialEq for BatchInputs
Source§fn eq(&self, other: &BatchInputs) -> bool
fn eq(&self, other: &BatchInputs) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for BatchInputs
impl StructuralPartialEq for BatchInputs
Auto Trait Implementations§
impl Freeze for BatchInputs
impl RefUnwindSafe for BatchInputs
impl Send for BatchInputs
impl Sync for BatchInputs
impl Unpin for BatchInputs
impl UnsafeUnpin for BatchInputs
impl UnwindSafe for BatchInputs
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).