Skip to main content

Policy

Trait Policy 

Source
pub trait Policy<S: Step> {
    type Decorated: Step<Input = S::Input, Output = S::Output>;

    // Required method
    fn apply(self, step: S) -> Self::Decorated;
}
Expand description

Policy trait, decorates a step with some extra behavior, such as retrying or logging

Any struct implementing Policy can be plugged into a Pipeline.

Required Associated Types§

Source

type Decorated: Step<Input = S::Input, Output = S::Output>

Required Methods§

Source

fn apply(self, step: S) -> Self::Decorated

Implementors§

Source§

impl<S: Step> Policy<S> for Retry
where S::Input: Clone,

Source§

type Decorated = RetryStep<S>