[][src]Trait thruster::Context

pub trait Context {
    type Response: Send;
    fn get_response(self) -> Self::Response;
fn set_body(&mut self, Vec<u8>); }

A Context is what will be passed between functions in the middleware for the defined routes of Thruster. Since a new context is made for each incomming request, it's important to keep this struct lean and quick, as well as the context_generator associated with it.

Associated Types

Loading content...

Required methods

fn get_response(self) -> Self::Response

fn set_body(&mut self, Vec<u8>)

Loading content...

Implementors

impl Context for BasicContext[src]

type Response = Response

Loading content...