Trait anansi_core::forms::Field

source ·
pub trait Field: Display {
    // Required methods
    fn label(&self) -> &'static str;
    fn widget(&self) -> &BoxWidget;
    fn mut_widget(&mut self) -> &mut BoxWidget;
    fn errors(&self) -> &FormErrors;
    fn add_error(&mut self, err: Box<dyn Error + Send + Sync>);

    // Provided method
    fn label_tag(&self) -> String { ... }
}

Required Methods§

source

fn label(&self) -> &'static str

source

fn widget(&self) -> &BoxWidget

source

fn mut_widget(&mut self) -> &mut BoxWidget

source

fn errors(&self) -> &FormErrors

source

fn add_error(&mut self, err: Box<dyn Error + Send + Sync>)

Provided Methods§

source

fn label_tag(&self) -> String

Implementors§