Trait gotham_formdata::FormData
source · [−]pub trait FormData: Sized {
type Err;
fn parse_form_data(state: &mut State) -> FormDataFuture<Self>;
}
Expand description
This is the trait implemented by #[derive(FormData)]
. It provides a method to parse the struct
it is implemented for to be parsed from the request body contained in gotham’s state.
You usually don’t implement this trait directly, use the derive macro instead.
Associated Types
Required methods
fn parse_form_data(state: &mut State) -> FormDataFuture<Self>
fn parse_form_data(state: &mut State) -> FormDataFuture<Self>
Parse the struct from the request body contained in gotham’s state.