Trait mas_templates::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

Object Safety§

This trait is not object safe.

Implementors§