Trait thruster::Context [−][src]
pub trait Context { fn get_response(&self) -> Response<String>; fn set_body(&mut self, _: String); }
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.
Required Methods
fn get_response(&self) -> Response<String>
fn set_body(&mut self, _: String)
Implementors
impl Context for BasicContext