pub struct InputBatch { /* private fields */ }Expand description
One owned, ordered input batch with an immutable admission target.
Implementations§
Source§impl InputBatch
impl InputBatch
Sourcepub fn new(
target: InputTarget,
items: Vec<Item>,
) -> Result<Self, EmptyInputBatchError>
pub fn new( target: InputTarget, items: Vec<Item>, ) -> Result<Self, EmptyInputBatchError>
Freezes an owned non-empty batch for one admission target.
§Errors
EmptyInputBatchError if items is empty. An empty batch would occupy
a place in the mailbox’s FIFO order and then open a Turn or Step boundary
with nothing to admit, so it is refused at construction rather than
discarded later, where the discard would be invisible to whoever queued it.
Sourcepub const fn target(&self) -> InputTarget
pub const fn target(&self) -> InputTarget
Returns the frozen target.
Sourcepub fn into_parts(self) -> (InputTarget, Vec<Item>)
pub fn into_parts(self) -> (InputTarget, Vec<Item>)
Transfers the frozen target and owned payload together.
Trait Implementations§
Source§impl Clone for InputBatch
impl Clone for InputBatch
Auto Trait Implementations§
impl Freeze for InputBatch
impl RefUnwindSafe for InputBatch
impl Send for InputBatch
impl Sync for InputBatch
impl Unpin for InputBatch
impl UnsafeUnpin for InputBatch
impl UnwindSafe for InputBatch
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