pub trait Batchable {
    type Item;

    // Required method
    fn item_size(item: &Self::Item) -> u64;

    // Provided method
    fn batches(items: Vec<Self::Item>, batch_size: u64) -> Vec<Vec<Self::Item>> { ... }
}

Required Associated Types§

Required Methods§

source

fn item_size(item: &Self::Item) -> u64

Provided Methods§

source

fn batches(items: Vec<Self::Item>, batch_size: u64) -> Vec<Vec<Self::Item>>

Object Safety§

This trait is not object safe.

Implementors§