Skip to main content

Batchable

Trait Batchable 

pub trait Batchable: Sized {
    // Required methods
    fn batch(value: Vec<Self>) -> Self;
    fn unbatch(self) -> Vec<Self>;
}
Expand description

Trait for a type that can be batched and unbatched (split).

Required Methods§

fn batch(value: Vec<Self>) -> Self

Create a batch from a list of items.

fn unbatch(self) -> Vec<Self>

Create a list from batched items.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§