Struct arguments::Options
[−]
pub struct Options(_);
A collection of named parameters.
Methods
impl Options
fn new() -> Options
Create a collection of named parameters.
fn get<T>(&self, name: &str) -> Option<T> where T: Clone + Any
Get the value of a parameter.
fn get_ref<T>(&self, name: &str) -> Option<&T> where T: Any
Get a reference to the value of a parameter.
fn get_mut<T>(&mut self, name: &str) -> Option<&mut T> where T: Any
Get a mutable reference to the value of a parameter.
fn set<T>(&'l mut self, name: &str, value: T) -> &'l mut Options where T: Any
Set the value of a parameter.
fn has(&self, name: &str) -> bool
Check the presence of a parameter.
fn iter(&'l self) -> Parameters<'l>
Return an iterator over parameters.
fn iter_mut(&'l mut self) -> ParametersMut<'l>
Return an iterator over mutable parameters.
fn names(&'l self) -> Names<'l>
Return an iterator over names.