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.

Trait Implementations

impl Debug for Options

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

impl<'l> IntoIterator for &'l Options

type Item = (&'l String, &'l Value)

type IntoIter = Parameters<'l>

fn into_iter(self) -> Parameters<'l>

impl<'l> IntoIterator for &'l mut Options

type Item = (&'l String, &'l mut Value)

type IntoIter = ParametersMut<'l>

fn into_iter(self) -> ParametersMut<'l>