pub trait ToFormState: Serialize {
type Field: FormField;
// Provided method
fn to_form_state(&self) -> FormState<Self::Field> { ... }
}
Expand description
Utility trait to help creating FormState
out of a form
Required Associated Types§
Provided Methods§
Sourcefn to_form_state(&self) -> FormState<Self::Field>
fn to_form_state(&self) -> FormState<Self::Field>
Generate a FormState
out of Self
§Panics
If the form fails to serialize or Self::Field
fails to deserialize
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.