Struct options::Options
[−]
[src]
pub struct Options(_);
A collection of named parameters.
Methods
impl Options
[src]
fn new() -> Options
Create a collection of named parameters.
fn get<T: Any + Clone>(&self, name: &str) -> Option<T>
Get the value of a parameter.
fn get_ref<T: Any>(&self, name: &str) -> Option<&T>
Get a reference to the value of a parameter.
fn get_mut<T: Any>(&mut self, name: &str) -> Option<&mut T>
Get a mutable reference to the value of a parameter.
fn set<'l, T: Any>(&'l mut self, name: &str, value: T) -> &'l mut Options
Set the value of a parameter.
fn has(&self, name: &str) -> bool
Check the presence of a parameter.
fn iter<'l>(&'l self) -> Parameters<'l>
Return an iterator over parameters.
fn iter_mut<'l>(&'l mut self) -> ParametersMut<'l>
Return an iterator over mutable parameters.
fn names<'l>(&'l self) -> Names<'l>
Return an iterator over names.
Trait Implementations
impl Debug for Options
[src]
impl<'l> IntoIterator for &'l Options
[src]
type Item = (&'l Name, &'l Value)
The type of the elements being iterated over.
type IntoIter = Parameters<'l>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Parameters<'l>
Creates an iterator from a value. Read more
impl<'l> IntoIterator for &'l mut Options
[src]
type Item = (&'l Name, &'l mut Value)
The type of the elements being iterated over.
type IntoIter = ParametersMut<'l>
Which kind of iterator are we turning this into?
fn into_iter(self) -> ParametersMut<'l>
Creates an iterator from a value. Read more