Skip to main content

MiddlewareService

Trait MiddlewareService 

Source
pub trait MiddlewareService: Service<Handle = Arc<Self>> {
    type Error: IntoResponse;

    // Required method
    fn call(
        &self,
        request: Request,
        next: impl Next,
    ) -> impl Future<Output = Result<Response, Self::Error>> + Send;
}

Required Associated Types§

Required Methods§

Source

fn call( &self, request: Request, next: impl Next, ) -> impl Future<Output = Result<Response, Self::Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§