pub struct OptionProperties {
pub option: String,
pub value: Value,
}Expand description
The type for each Option; holds the information for each element of a line in a config file.
§Examples
A function argument:
fn assign_properties(st_option_props: &configster::OptionProperties, homedir: &str) {
let mut value = "$HOME/Documents";
value = st_option_props.value.primary.replace("$HOME", &homedir);
}A return type:
fn parse(
opt_cfg: Option<String>,
homedir: String,
) -> io::Result<Vec<configster::OptionProperties>> {
// ...
Ok(config_vec)
}Fields§
§option: String§value: ValueTrait Implementations§
Source§impl Debug for OptionProperties
impl Debug for OptionProperties
Source§impl PartialEq for OptionProperties
impl PartialEq for OptionProperties
impl StructuralPartialEq for OptionProperties
Auto Trait Implementations§
impl Freeze for OptionProperties
impl RefUnwindSafe for OptionProperties
impl Send for OptionProperties
impl Sync for OptionProperties
impl Unpin for OptionProperties
impl UnwindSafe for OptionProperties
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more