Trait rooting_forms::Form

source ·
pub trait Form {
    // Required method
    fn new_form(field: &'static str) -> Box<dyn FormState<Self>>;
}
Expand description

This represnts a rust datatype that can be included in a form.

Required Methods§

source

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

Generates a form for a new value (no existing value).

  • field - is the field name, for accessibility using aria-label. <label> isn’t used sometime due to anonymous fields in tuples.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Form for bool

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for f32

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for f64

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for i8

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for i16

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for i32

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for i64

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for u8

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for u16

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for u32

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for u64

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl Form for String

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

source§

impl<T: Form + 'static> Form for Option<T>

source§

fn new_form(field: &'static str) -> Box<dyn FormState<Self>>

Implementors§