Trait ComplexStepBuilderTrait

Source
pub trait ComplexStepBuilderTrait<I: Sized, O: Sized> {
    // Required methods
    fn reader(
        self,
        reader: Box<dyn Fn() -> Box<dyn Iterator<Item = I>> + Send>,
    ) -> Self;
    fn processor(
        self,
        processor: Box<dyn Fn() -> Box<dyn Fn(I) -> O> + Send>,
    ) -> Self;
    fn writer(
        self,
        writer: Box<dyn Fn() -> Box<dyn Fn(&Vec<O>)> + Send>,
    ) -> Self;
    fn chunk_size(self, chunk_size: usize) -> Self;
}
Expand description

A trait for building complex synchronous steps.

Required Methods§

Source

fn reader( self, reader: Box<dyn Fn() -> Box<dyn Iterator<Item = I>> + Send>, ) -> Self

Sets the reader function for the step.

§Arguments
  • reader - The reader function.
§Returns Self

Returns a modified builder instance.

Source

fn processor( self, processor: Box<dyn Fn() -> Box<dyn Fn(I) -> O> + Send>, ) -> Self

Sets the processor function for the step.

§Arguments
  • processor - The processor function.
§Returns Self

Returns a modified builder instance.

Source

fn writer(self, writer: Box<dyn Fn() -> Box<dyn Fn(&Vec<O>)> + Send>) -> Self

Sets the writer function for the step.

§Arguments
  • writer - The writer function.
§Returns Self

Returns a modified builder instance.

Source

fn chunk_size(self, chunk_size: usize) -> Self

Sets the chunk size for processing data in chunks.

§Arguments
  • chunk_size - The chunk size.
§Returns Self

Returns a modified builder instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I: Sized + 'static, O: Sized + 'static> ComplexStepBuilderTrait<I, O> for ComplexStepBuilder<I, O>