Struct susanoo::Context [] [src]

pub struct Context {
    pub req: Request,
    pub params: OwnedCaptures,
    pub body: Option<Body>,
    pub handle: Remote,
    pub ext: SendMap,
    // some fields omitted
}

A context during handling.

It contains an HTTP request, HTTP response to return, and a typemap in order to share variables between middlewares.

Fields

Incoming request contains URI, method, headers, and body

Captured parameters from router

Request body

Handle of event loop

Extension map to share values between handlers/middlewares

Methods

impl Context
[src]

Register a callback function called after construct response.