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§

source

fn with_capacity(n: usize) -> Self

source

fn len(&self) -> usize

source

fn push(&mut self, item: <Self as Batch>::Item)

Provided Methods§

source

fn is_empty(&self) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Batch for Vec<T>

§

type Item = T

source§

fn with_capacity(n: usize) -> Vec<T>

source§

fn len(&self) -> usize

source§

fn push(&mut self, item: T)

Implementors§