Trait vector_stream::batcher::limiter::ItemBatchSize

source ·
pub trait ItemBatchSize<T> {
    // Required method
    fn size(&self, item: &T) -> usize;
}

Required Methods§

source

fn size(&self, item: &T) -> usize

The size of an individual item in a batch.

Implementors§

source§

impl<T, F> ItemBatchSize<T> for F
where F: Fn(&T) -> usize,

source§

impl<T: ByteSizeOf> ItemBatchSize<T> for ByteSizeOfItemSize