Trait OptStore

Source
pub trait OptStore {
    // Required methods
    fn make_opt_cfgs(&self) -> Vec<OptCfg>;
    fn set_field_values(
        &mut self,
        m: &HashMap<&str, Vec<&str>>,
    ) -> Result<(), InvalidOption>;
}
Expand description

Requires the method to make a OptCfg vector from the struct instance which implements this trait.

Required Methods§

Source

fn make_opt_cfgs(&self) -> Vec<OptCfg>

Makes a vector of OptCfg struct instances from the field definitions and opt field attributes of the struct instance.

Source

fn set_field_values( &mut self, m: &HashMap<&str, Vec<&str>>, ) -> Result<(), InvalidOption>

Sets the values in the argument map to the fields in this struct The key in the map is a store key of OptCfg.

Implementors§