Trait axum::RequestPartsExt
source · [−]pub trait RequestPartsExt: Sealed + Sized {
fn extract<E>(&mut self) -> BoxFuture<'_, Result<E, E::Rejection>>
where
E: FromRequestParts<()> + 'static;
fn extract_with_state<'a, E, S>(
&'a mut self,
state: &'a S
) -> BoxFuture<'a, Result<E, E::Rejection>>
where
E: FromRequestParts<S> + 'static,
S: Send + Sync;
}
Expand description
Extension trait that adds additional methods to Parts
.
Required Methods
Apply an extractor to this Parts
.
This is just a convenience for E::from_request_parts(parts, &())
.
sourcefn extract_with_state<'a, E, S>(
&'a mut self,
state: &'a S
) -> BoxFuture<'a, Result<E, E::Rejection>>where
E: FromRequestParts<S> + 'static,
S: Send + Sync,
fn extract_with_state<'a, E, S>(
&'a mut self,
state: &'a S
) -> BoxFuture<'a, Result<E, E::Rejection>>where
E: FromRequestParts<S> + 'static,
S: Send + Sync,
Apply an extractor that requires some state to this Parts
.
This is just a convenience for E::from_request_parts(parts, state)
.