Trait viz_core::FromRequest
source · pub trait FromRequest: Sized {
type Error: IntoResponse;
// Required method
fn extract<'life0, 'async_trait>(
req: &'life0 mut Request
) -> Pin<Box<dyn Future<Output = Result<Self, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
An interface for extracting data from the HTTP Request
.
Required Associated Types§
sourcetype Error: IntoResponse
type Error: IntoResponse
The type returned in the event of a conversion error.
Required Methods§
Implementations on Foreign Types§
source§impl<I, J, K, L> FromRequest for (I, J, K, L)where
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<I, J, K, L> FromRequest for (I, J, K, L)where I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<D, E, F, G, H, I, J, K, L> FromRequest for (D, E, F, G, H, I, J, K, L)where
D: FromRequest + Send + 'static,
E: FromRequest + Send + 'static,
F: FromRequest + Send + 'static,
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
D::Error: IntoResponse + Send,
E::Error: IntoResponse + Send,
F::Error: IntoResponse + Send,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<D, E, F, G, H, I, J, K, L> FromRequest for (D, E, F, G, H, I, J, K, L)where D: FromRequest + Send + 'static, E: FromRequest + Send + 'static, F: FromRequest + Send + 'static, G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, D::Error: IntoResponse + Send, E::Error: IntoResponse + Send, F::Error: IntoResponse + Send, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<L> FromRequest for (L,)where
L: FromRequest + Send + 'static,
L::Error: IntoResponse + Send,
impl<L> FromRequest for (L,)where L: FromRequest + Send + 'static, L::Error: IntoResponse + Send,
source§impl<C, D, E, F, G, H, I, J, K, L> FromRequest for (C, D, E, F, G, H, I, J, K, L)where
C: FromRequest + Send + 'static,
D: FromRequest + Send + 'static,
E: FromRequest + Send + 'static,
F: FromRequest + Send + 'static,
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
C::Error: IntoResponse + Send,
D::Error: IntoResponse + Send,
E::Error: IntoResponse + Send,
F::Error: IntoResponse + Send,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<C, D, E, F, G, H, I, J, K, L> FromRequest for (C, D, E, F, G, H, I, J, K, L)where C: FromRequest + Send + 'static, D: FromRequest + Send + 'static, E: FromRequest + Send + 'static, F: FromRequest + Send + 'static, G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, C::Error: IntoResponse + Send, D::Error: IntoResponse + Send, E::Error: IntoResponse + Send, F::Error: IntoResponse + Send, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<H, I, J, K, L> FromRequest for (H, I, J, K, L)where
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<H, I, J, K, L> FromRequest for (H, I, J, K, L)where H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<B, C, D, E, F, G, H, I, J, K, L> FromRequest for (B, C, D, E, F, G, H, I, J, K, L)where
B: FromRequest + Send + 'static,
C: FromRequest + Send + 'static,
D: FromRequest + Send + 'static,
E: FromRequest + Send + 'static,
F: FromRequest + Send + 'static,
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
B::Error: IntoResponse + Send,
C::Error: IntoResponse + Send,
D::Error: IntoResponse + Send,
E::Error: IntoResponse + Send,
F::Error: IntoResponse + Send,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<B, C, D, E, F, G, H, I, J, K, L> FromRequest for (B, C, D, E, F, G, H, I, J, K, L)where B: FromRequest + Send + 'static, C: FromRequest + Send + 'static, D: FromRequest + Send + 'static, E: FromRequest + Send + 'static, F: FromRequest + Send + 'static, G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, B::Error: IntoResponse + Send, C::Error: IntoResponse + Send, D::Error: IntoResponse + Send, E::Error: IntoResponse + Send, F::Error: IntoResponse + Send, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<K, L> FromRequest for (K, L)where
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<K, L> FromRequest for (K, L)where K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<A, B, C, D, E, F, G, H, I, J, K, L> FromRequest for (A, B, C, D, E, F, G, H, I, J, K, L)where
A: FromRequest + Send + 'static,
B: FromRequest + Send + 'static,
C: FromRequest + Send + 'static,
D: FromRequest + Send + 'static,
E: FromRequest + Send + 'static,
F: FromRequest + Send + 'static,
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
A::Error: IntoResponse + Send,
B::Error: IntoResponse + Send,
C::Error: IntoResponse + Send,
D::Error: IntoResponse + Send,
E::Error: IntoResponse + Send,
F::Error: IntoResponse + Send,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<A, B, C, D, E, F, G, H, I, J, K, L> FromRequest for (A, B, C, D, E, F, G, H, I, J, K, L)where A: FromRequest + Send + 'static, B: FromRequest + Send + 'static, C: FromRequest + Send + 'static, D: FromRequest + Send + 'static, E: FromRequest + Send + 'static, F: FromRequest + Send + 'static, G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, A::Error: IntoResponse + Send, B::Error: IntoResponse + Send, C::Error: IntoResponse + Send, D::Error: IntoResponse + Send, E::Error: IntoResponse + Send, F::Error: IntoResponse + Send, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl FromRequest for ()
impl FromRequest for ()
source§impl<T> FromRequest for Result<T, T::Error>where
T: FromRequest,
impl<T> FromRequest for Result<T, T::Error>where T: FromRequest,
source§impl<J, K, L> FromRequest for (J, K, L)where
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<J, K, L> FromRequest for (J, K, L)where J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<G, H, I, J, K, L> FromRequest for (G, H, I, J, K, L)where
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<G, H, I, J, K, L> FromRequest for (G, H, I, J, K, L)where G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<T> FromRequest for Option<T>where
T: FromRequest,
impl<T> FromRequest for Option<T>where T: FromRequest,
source§impl<F, G, H, I, J, K, L> FromRequest for (F, G, H, I, J, K, L)where
F: FromRequest + Send + 'static,
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
F::Error: IntoResponse + Send,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<F, G, H, I, J, K, L> FromRequest for (F, G, H, I, J, K, L)where F: FromRequest + Send + 'static, G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, F::Error: IntoResponse + Send, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
source§impl<E, F, G, H, I, J, K, L> FromRequest for (E, F, G, H, I, J, K, L)where
E: FromRequest + Send + 'static,
F: FromRequest + Send + 'static,
G: FromRequest + Send + 'static,
H: FromRequest + Send + 'static,
I: FromRequest + Send + 'static,
J: FromRequest + Send + 'static,
K: FromRequest + Send + 'static,
L: FromRequest + Send + 'static,
E::Error: IntoResponse + Send,
F::Error: IntoResponse + Send,
G::Error: IntoResponse + Send,
H::Error: IntoResponse + Send,
I::Error: IntoResponse + Send,
J::Error: IntoResponse + Send,
K::Error: IntoResponse + Send,
L::Error: IntoResponse + Send,
impl<E, F, G, H, I, J, K, L> FromRequest for (E, F, G, H, I, J, K, L)where E: FromRequest + Send + 'static, F: FromRequest + Send + 'static, G: FromRequest + Send + 'static, H: FromRequest + Send + 'static, I: FromRequest + Send + 'static, J: FromRequest + Send + 'static, K: FromRequest + Send + 'static, L: FromRequest + Send + 'static, E::Error: IntoResponse + Send, F::Error: IntoResponse + Send, G::Error: IntoResponse + Send, H::Error: IntoResponse + Send, I::Error: IntoResponse + Send, J::Error: IntoResponse + Send, K::Error: IntoResponse + Send, L::Error: IntoResponse + Send,
Implementors§
source§impl FromRequest for Cookies
Available on crate feature cookie
only.
impl FromRequest for Cookies
Available on crate feature
cookie
only.type Error = CookiesError
source§impl FromRequest for Limits
Available on crate feature limits
only.
impl FromRequest for Limits
Available on crate feature
limits
only.type Error = Infallible
source§impl FromRequest for Session
Available on crate feature session
only.
impl FromRequest for Session
Available on crate feature
session
only.type Error = Infallible
source§impl FromRequest for WebSocket
Available on crate feature websocket
only.
impl FromRequest for WebSocket
Available on crate feature
websocket
only.type Error = WebSocketError
source§impl FromRequest for Multipart
Available on crate feature multipart
only.
impl FromRequest for Multipart
Available on crate feature
multipart
only.type Error = PayloadError
source§impl<T> FromRequest for Form<T>where
T: DeserializeOwned,
Available on crate feature form
only.
impl<T> FromRequest for Form<T>where T: DeserializeOwned,
Available on crate feature
form
only.type Error = PayloadError
source§impl<T> FromRequest for Header<T>where
T: Header,
impl<T> FromRequest for Header<T>where T: Header,
type Error = HeaderError
source§impl<T> FromRequest for Json<T>where
T: DeserializeOwned,
Available on crate feature json
only.
impl<T> FromRequest for Json<T>where T: DeserializeOwned,
Available on crate feature
json
only.type Error = PayloadError
source§impl<T> FromRequest for Params<T>where
T: DeserializeOwned,
Available on crate feature params
only.
impl<T> FromRequest for Params<T>where T: DeserializeOwned,
Available on crate feature
params
only.type Error = ParamsError
source§impl<T> FromRequest for Query<T>where
T: DeserializeOwned,
Available on crate feature query
only.
impl<T> FromRequest for Query<T>where T: DeserializeOwned,
Available on crate feature
query
only.type Error = PayloadError
source§impl<T> FromRequest for State<T>where
T: Clone + Send + Sync + 'static,
Available on crate feature state
only.
impl<T> FromRequest for State<T>where T: Clone + Send + Sync + 'static,
Available on crate feature
state
only.