[−][src]Trait actix_web::middleware::Middleware
Middleware definition
Provided Methods
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
Method is called when request is ready. It may return future, which should resolve before next middleware get called.
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
Method is called when handler returns response, but before sending http message to peer.
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
Method is called after body stream get sent to peer.
Implementors
impl<S> Middleware<S> for Cors
[src]
impl<S> Middleware<S> for Cors
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
impl<S> Middleware<S> for CsrfFilter
[src]
impl<S> Middleware<S> for CsrfFilter
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
impl<S> Middleware<S> for DefaultHeaders
[src]
impl<S> Middleware<S> for DefaultHeaders
fn response(&self, _: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, _: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
impl<S> Middleware<S> for Logger
[src]
impl<S> Middleware<S> for Logger
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
impl<S: 'static> Middleware<S> for ErrorHandlers<S>
[src]
impl<S: 'static> Middleware<S> for ErrorHandlers<S>
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
impl<S: 'static, T: IdentityPolicy<S>> Middleware<S> for IdentityService<T>
[src]
impl<S: 'static, T: IdentityPolicy<S>> Middleware<S> for IdentityService<T>
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
impl<S: 'static, T: SessionBackend<S>> Middleware<S> for SessionStorage<T, S>
[src]
impl<S: 'static, T: SessionBackend<S>> Middleware<S> for SessionStorage<T, S>
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
[src]
fn start(&self, req: &HttpRequest<S>) -> Result<Started>
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
[src]
fn response(&self, req: &HttpRequest<S>, resp: HttpResponse) -> Result<Response>
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished
[src]
fn finish(&self, req: &HttpRequest<S>, resp: &HttpResponse) -> Finished