Skip to main content

Batched

Trait Batched 

Source
pub trait Batched: Sized + IntoExactSizeIterator<Item = Self::Item> {
    type Item;
    type Size: Positive;

    // Provided method
    fn batch_size() -> usize { ... }
}
Expand description

A trait to define batching types that contain a compile-time known size of elements.

Required Associated Types§

Source

type Item

The type of elements contained in the batch.

Source

type Size: Positive

The size of the batch.

Provided Methods§

Source

fn batch_size() -> usize

Returns the size of the batch as a usize.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§