Trait gotham_formdata::FormData[][src]

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

type Err[src]

The error type returned when parsing the request body was unsuccessful.

Required methods

fn parse_form_data(state: &mut State) -> FormDataFuture<Self>[src]

Parse the struct from the request body contained in gotham’s state.

Implementors