pub struct Options { /* private fields */ }Expand description
The current setting of every knob a tool declared.
Built from the specs, so every lookup has a default and the getters cannot fail — tool implementations never deal with missing options.
Implementations§
Source§impl Options
impl Options
pub fn from_specs(specs: &[OptionSpec]) -> Self
pub fn get(&self, id: &str) -> Option<&OptionValue>
pub fn set(&mut self, id: &'static str, value: OptionValue)
pub fn bool(&self, id: &str) -> bool
pub fn choice(&self, id: &str) -> &str
pub fn number(&self, id: &str) -> i64
pub fn text(&self, id: &str) -> &str
Trait Implementations§
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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