Struct viz::prelude::Context [−][src]
pub struct Context { /* fields omitted */ }
Expand description
The Context
of an HTTP request - response
.
Implementations
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.
Returns a reference to the associated middleware.
Returns a mutable reference to the associated middleware.
Returns a data from the Context
with a Extractor.
pub async fn form<T>(&'_ mut self) -> Result<T, PayloadError> where
T: DeserializeOwned + Send + Sync,
pub async fn form<T>(&'_ mut self) -> Result<T, PayloadError> where
T: DeserializeOwned + Send + Sync,
Extracts Form Data from the request’ body.
Extracts JSON Data from the request’ body.
Extracts Multipart from the request’ body.
Gets parameters.
Gets query parameters from the path
Trait Implementations
impl<'a, H, A> Handle<'a, Context> for Endpoint<H, A> where
A: 'static + Extract + Send,
H: 'static + Handler<A> + Send + Sync,
<A as Extract>::Error: Into<Response>,
<A as Extract>::Error: Send,
<H as Handler<A>>::Output: Into<Response>,
<H as Handler<A>>::Future: 'static,
<H as Handler<A>>::Future: Future,
<H as Handler<A>>::Future: Send,
<<H as Handler<A>>::Future as Future>::Output == <H as Handler<A>>::Output,
impl<'a, H, A> Handle<'a, Context> for Endpoint<H, A> where
A: 'static + Extract + Send,
H: 'static + Handler<A> + Send + Sync,
<A as Extract>::Error: Into<Response>,
<A as Extract>::Error: Send,
<H as Handler<A>>::Output: Into<Response>,
<H as Handler<A>>::Future: 'static,
<H as Handler<A>>::Future: Future,
<H as Handler<A>>::Future: Send,
<<H as Handler<A>>::Future as Future>::Output == <H as Handler<A>>::Output,
Auto Trait Implementations
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
Blanket Implementations
Mutably borrows from an owned value. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn vzip(self) -> V
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more