pub trait Collate<Sample> {
type Batch;
type Error;
// Required method
fn collate(
&mut self,
samples: Vec<Sample>,
) -> Result<Self::Batch, Self::Error>;
}Expand description
Converts an owned group of samples into one batch.
See DefaultCollator, DefaultConverter, FnCollate, and
VecCollate for compiling examples of the built-in implementations.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".