thruster_core/context.rs
1/// A `Context` is what will be passed between functions in the middleware for
2/// the defined routes of Thruster. Since a new context is made for each
3/// incomming request, it's important to keep this struct lean and quick, as
4/// well as the `context_generator` associated with it.
5pub trait Context {
6 type Response: Send;
7
8 fn get_response(self) -> Self::Response;
9 fn set_body(&mut self, _: Vec<u8>);
10}