Trait FormDataFromState

Source
pub trait FormDataFromState {
    // Required method
    fn parse_form_data<T: FormData>(&mut self) -> FormDataFuture<T>;
}
Expand description

This is the equivalent of FormData from the state’s perspective. Use this if you prefer state.parse_form_data::<MyData>()? over MyData::parse_form_data(&mut state)?.

Required Methods§

Source

fn parse_form_data<T: FormData>(&mut self) -> FormDataFuture<T>

Parse T from the request body contained in this state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FormDataFromState for State

Implementors§