pub struct OptionDef {
pub name: String,
pub short_name: Option<char>,
pub opt_type: OptionType,
pub default_value: OptionValue,
pub description: String,
pub category: OptionCategory,
pub min: Option<i64>,
pub max: Option<u64>,
pub deprecated: bool,
pub hidden: bool,
}Expand description
Definition/metadata for a single configuration option.
Fields§
§name: String§short_name: Option<char>§opt_type: OptionType§default_value: OptionValue§description: String§category: OptionCategory§min: Option<i64>§max: Option<u64>§deprecated: boolImplementations§
Source§impl OptionDef
impl OptionDef
pub fn new(name: impl Into<String>, opt_type: OptionType) -> Self
pub fn name(&self) -> &str
pub fn short_name(&self) -> Option<char>
pub fn opt_type(&self) -> OptionType
pub fn default_value(&self) -> &OptionValue
pub fn get_category(&self) -> OptionCategory
pub fn is_deprecated(&self) -> bool
pub fn description(&self) -> &str
pub fn parse_value(&self, s: &str) -> Result<OptionValue, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptionDef
impl RefUnwindSafe for OptionDef
impl Send for OptionDef
impl Sync for OptionDef
impl Unpin for OptionDef
impl UnsafeUnpin for OptionDef
impl UnwindSafe for OptionDef
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