pub struct Form<T>(pub T);Available on crate features
server and form only.Expand description
Extract a type from a urlencoded body.
Note that the type must implement Deserialize.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<B, T> FromRequest<B> for Form<T>
impl<B, T> FromRequest<B> for Form<T>
Source§type Rejection = ExtractBodyError
type Rejection = ExtractBodyError
If the extractor fails, it will return this
Rejection type. Read moreSource§async fn from_request(
cx: &mut ServerContext,
parts: Parts,
body: B,
) -> Result<Self, Self::Rejection>
async fn from_request( cx: &mut ServerContext, parts: Parts, body: B, ) -> Result<Self, Self::Rejection>
Extract the type from request.
Source§impl<T> IntoResponse for Form<T>where
T: Serialize,
impl<T> IntoResponse for Form<T>where
T: Serialize,
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Consume self and convert it into a
Responseimpl<T: Copy> Copy for Form<T>
Auto Trait Implementations§
impl<T> Freeze for Form<T>where
T: Freeze,
impl<T> RefUnwindSafe for Form<T>where
T: RefUnwindSafe,
impl<T> Send for Form<T>where
T: Send,
impl<T> Sync for Form<T>where
T: Sync,
impl<T> Unpin for Form<T>where
T: Unpin,
impl<T> UnwindSafe for Form<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more