pub trait FormData: Sized {
    type Err;

    // Required method
    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.

Required Associated Types§

source

type Err

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

Required Methods§

source

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

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

Implementors§