pub trait BatchSource {
type Iter: Iterator<Item = Vec<usize>>;
// Required methods
fn iter(&self) -> Self::Iter;
fn epoch(&self) -> u64;
fn set_epoch(&mut self, epoch: u64);
// Provided method
fn exact_len(&self) -> Option<usize> { ... }
}Expand description
A reusable, epoch-aware source of finite index batches.
Every call to BatchSource::iter creates a fresh iterator. An exact
number of batches is optional and is never required for iteration.
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".