pub struct Context { /* fields omitted */ }
Expand description
The Context
of an HTTP request - response
.
Consumes the request to Context
Returns a reference to the associated HTTP method.
Returns the associated version.
Returns a reference to the associated URI.
Returns a reference to the associated path portion of the URL.
Returns a reference to the associated query portion of the URL.
Returns a reference to the associated host portion of the URL.
Returns a reference to the associated header by key.
Returns a value by header key.
Returns a reference to the associated header field map.
Returns a reference to the associated extensions.
Returns a mutable reference to the associated extensions.
pub fn take_body(&mut self) -> Option<Body>
Consumes the request, returning just the body.
Returns a reference to the associated middleware.
Returns a mutable reference to the associated middleware.
Returns a data from the Context
with a Extractor.
Invokes the next middleware.
Gets single cookie by name.
Extracts Form Data from the request’ body.
Extracts JSON Data from the request’ body.
Extracts Multipart from the request’ body.
Gets single parameter by name.
Gets query parameters from the path
Formats the value using the given formatter. Read more
impl<'a, F, T> Handle<'a, Context> for HandlerSuper<F, T> where
T: Extract + Send + Sync + 'static,
F: for<'h> HandlerCamp<'h, T> + Send + Sync + 'static,
<T as Extract>::Error: Into<Response>,
<T as Extract>::Error: Send,
Invokes the handler within the given Context
and then returns Output
impl<'a, F, T> Handle<'a, Context> for HandlerWrapper<F, T> where
T: Extract + Send + Sync + 'static,
F: HandlerBase<T> + Send + Sync + 'static,
<T as Extract>::Error: Into<Response>,
<T as Extract>::Error: Send,
Invokes the handler within the given Context
and then returns Output
Invokes the handler within the given Context
and then returns Output
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the current Span
, returning an
Instrumented
wrapper. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,