Skip to main content

Batcher

Trait Batcher 

pub trait Batcher<I, O>: Send + Sync {
    // Required method
    fn batch(&self, items: Vec<I>, device: &Device) -> O;
}
Expand description

A trait for batching items of type I into items of type O.

Required Methods§

fn batch(&self, items: Vec<I>, device: &Device) -> O

Batches the given items on the specified device.

§Arguments
  • items - The items to batch.
  • device - The backend device to use.
§Returns

The batched items.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§