Skip to main content

PipelineStep

Trait PipelineStep 

Source
pub trait PipelineStep:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn check<'a>(
        &'a self,
        _request: &'a RequestHead<'a>,
    ) -> BoxFuture<'a, Result<()>> { ... }
    fn answered(
        &self,
        _request: &RequestHead<'_>,
        _answer: &mut ResponseHead<'_>,
    ) { ... }
}
Expand description

check can only refuse and runs after CSRF, the guard and rate limits, so a step cannot let through what they refused.

Provided Methods§

Source

fn check<'a>( &'a self, _request: &'a RequestHead<'a>, ) -> BoxFuture<'a, Result<()>>

Before the body is read.

Source

fn answered(&self, _request: &RequestHead<'_>, _answer: &mut ResponseHead<'_>)

Before compression and the framework’s security and CORS headers.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§