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§
Sourcefn make_opt_cfgs(&self) -> Vec<OptCfg>
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.
Sourcefn set_field_values(
&mut self,
m: &HashMap<&str, Vec<&str>>,
) -> Result<(), InvalidOption>
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.