[−][src]Struct saphir::http_context::HttpContext
Context representing the relationship between a request and a response This structure only appears inside Middleware since the act before and after the request
There is no guaranty the the request nor the response will be set at any given time, since they could be moved out by a badly implemented middleware
Fields
state: State
The incoming request Before
it is handled by the router
OR
The outgoing response After
the request was handled by the router
Methods
impl HttpContext
[src]
pub fn before(&mut self, request: Request)
[src]
Explicitly set the inner state to Before
with the given response
pub fn after(&mut self, response: Response)
[src]
Explicitly set the inner state to After
with the given response
Auto Trait Implementations
impl !RefUnwindSafe for HttpContext
impl Send for HttpContext
impl Sync for HttpContext
impl Unpin for HttpContext
impl !UnwindSafe for HttpContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,