Trait batched_fn::Batch
source · pub trait Batch: IntoIterator<Item = Self::Item> {
type Item;
// Required methods
fn with_capacity(n: usize) -> Self;
fn len(&self) -> usize;
fn push(&mut self, item: <Self as Batch>::Item);
// Provided method
fn is_empty(&self) -> bool { ... }
}
Expand description
The Batch
trait is essentially an abstraction of Vec<T>
. The input and output of a batch
handler
must implement Batch
.
It represents an owned collection of ordered items of a single type.
Required Associated Types§
Required Methods§
fn with_capacity(n: usize) -> Self
fn len(&self) -> usize
fn push(&mut self, item: <Self as Batch>::Item)
Provided Methods§
Object Safety§
This trait is not object safe.