Skip to main content

ToFormState

Trait ToFormState 

Source
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§

Source

type Field: FormField

The enum used for field names

Provided Methods§

Source

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".

Implementors§