Skip to main content

HttpPipeTransform

Trait HttpPipeTransform 

Source
pub trait HttpPipeTransform<Input>:
    PipeTransform<Input, Error: Error + Send + Sync>
    + Default
    + Send
    + Sync
    + 'static { }
Expand description

Marker trait for pipe types usable in HTTP #[use_pipes]. Adds the Default bound the macro needs to instantiate each pipe at extraction time without going through DI, and constrains Error to std::error::Error so the per-arity extractors can box pipe errors and downcast to HttpException (preserving the per-pipe status code).

Implement this alongside your PipeTransform impl for each input type your pipe accepts. The macro emits a per-arity extractor that calls <P as Default>::default().transform(value).await? for each pipe in declaration order.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§