Trait BatchContext

Source
pub trait BatchContext<T>
where T: Clone + Send + Sync + 'static,
{ // Required methods fn get_batch_items(&self) -> Result<Vec<T>, FloxideError>; fn create_item_context(&self, item: T) -> Result<Self, FloxideError> where Self: Sized; fn update_with_results( &mut self, results: &[Result<T, FloxideError>], ) -> Result<(), FloxideError>; }
Expand description

Trait for contexts that support batch processing

Required Methods§

Source

fn get_batch_items(&self) -> Result<Vec<T>, FloxideError>

Get the items to process in batch

Source

fn create_item_context(&self, item: T) -> Result<Self, FloxideError>
where Self: Sized,

Create a context for a single item

Source

fn update_with_results( &mut self, results: &[Result<T, FloxideError>], ) -> Result<(), FloxideError>

Update the main context with results from item processing

Implementors§