Trait mango_orm::forms::caching::CachingForm[][src]

pub trait CachingForm: ToForm + HtmlControls {
    fn widgets_to_cache() -> Result<(), Box<dyn Error>> { ... }
fn form_wig() -> Result<HashMap<String, Widget>, Box<dyn Error>> { ... }
fn form_json() -> Result<String, Box<dyn Error>> { ... }
fn form_html() -> Result<String, Box<dyn Error>> { ... }
fn get_cache_data() -> Result<FormCache, Box<dyn Error>> { ... } }

Provided methods

Add map of widgets to cache.

Get an widgets map for page template.

Example:

let widgets_map = RestorePasswordForm::form_wig()?;
println!("{:?}", widgets_map);

Get Form attributes in Json format for page templates.

Example:

let json_line = RestorePasswordForm::form_json()?;
println!("{}", json_line);

Get Html Form of Model for page templates.

Example:

let html = RestorePasswordForm::form_html()?;
println!("{}", html);

Get cached Form data.

Example:

let form_cache = RestorePasswordForm::get_cache_data()?;
println!("{:?}", form_cache);

Implementors