pub trait FromFormDatawhere
Self: Sized + DeserializeOwned,{
// Required methods
fn from_event(ev: &Event) -> Result<Self, FromFormDataError>;
fn from_form_data(form_data: &FormData) -> Result<Self, Error>;
}Expand description
Tries to deserialize a type from form data. This can be used for client-side validation during form submission.
Required Methods§
Sourcefn from_event(ev: &Event) -> Result<Self, FromFormDataError>
fn from_event(ev: &Event) -> Result<Self, FromFormDataError>
Tries to deserialize the data, given only the submit event.
Sourcefn from_form_data(form_data: &FormData) -> Result<Self, Error>
fn from_form_data(form_data: &FormData) -> Result<Self, Error>
Tries to deserialize the data, given the actual form data.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".