Skip to main content

Pipe

Trait Pipe 

Source
pub trait Pipe<Input>:
    Send
    + Sync
    + 'static {
    type Output;
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn transform(&self, input: Input) -> Result<Self::Output, Self::Error>;
}
Expand description

Typed request transformation or validation pipe.

Required Associated Types§

Source

type Output

Output produced by this pipe.

Source

type Error: Error + Send + Sync + 'static

Error emitted when transformation or validation fails.

Required Methods§

Source

fn transform(&self, input: Input) -> Result<Self::Output, Self::Error>

Transforms or validates the input value.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T> Pipe<T> for ValidationPipe
where T: Validate<Context = ()>,