Skip to main content

Step

Trait Step 

Source
pub trait Step {
    type Input;
    type Output;

    // Required method
    fn execute(&self, input: Self::Input) -> Result<Self::Output, PipelineError>;

    // Provided method
    fn with<P>(self, policy: P) -> P::Decorated
       where P: Policy<Self>,
             Self: Sized { ... }
}
Expand description

The core trait for all transformation logic.

Any struct implementing Step can be plugged into a Pipeline.

Required Associated Types§

Source

type Input

The type of data this stage accepts.

Source

type Output

The type of data this stage produces.

Required Methods§

Source

fn execute(&self, input: Self::Input) -> Result<Self::Output, PipelineError>

Executes the logic for this specific stage.

Provided Methods§

Source

fn with<P>(self, policy: P) -> P::Decorated
where P: Policy<Self>, Self: Sized,

Decorates this step with a policy

Implementors§