Trait rooting_forms::FormWith
source · pub trait FormWith<C> {
// Required method
fn new_form(
context: &C,
field: &str,
from: Option<&Self>
) -> Box<dyn FormState<Self>>;
}Expand description
Like Form but allows passing in additional context, for custom elements that
need it. FormWith<()> is generated by the Form derive macro.
Required Methods§
sourcefn new_form(
context: &C,
field: &str,
from: Option<&Self>
) -> Box<dyn FormState<Self>>
fn new_form( context: &C, field: &str, from: Option<&Self> ) -> Box<dyn FormState<Self>>
Generates a form state manager to produce form elements and parse the entered values.
context- any additional data to be used when generating form states and elements. This is forwarded to all nestednew_formcalls.
See Form for the other fields.
Object Safety§
This trait is not object safe.