[−][src]Struct clap::Values
An iterator for getting multiple values out of an argument via the ArgMatches::values_of
method.
Examples
let m = App::new("myapp") .arg(Arg::with_name("output") .short("o") .multiple(true) .takes_value(true)) .get_matches_from(vec!["myapp", "-o", "val1", "val2"]); let mut values = m.values_of("output").unwrap(); assert_eq!(values.next(), Some("val1")); assert_eq!(values.next(), Some("val2")); assert_eq!(values.next(), None);
Trait Implementations
impl<'a> Iterator for Values<'a>
[src][+]
impl<'a> ExactSizeIterator for Values<'a>
[src][+]
impl<'a> DoubleEndedIterator for Values<'a>
[src][+]
impl<'a> Default for Values<'a>
[src][+]
impl<'a> Clone for Values<'a>
[src][+]
Auto Trait Implementations
Blanket Implementations
impl<I> IntoIterator for I where
I: Iterator,
[src][−]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src][−]
impl<T> From for T
[src][−]
impl<T, U> Into for T where
U: From<T>,
[src][−]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src][−]
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src][−]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
impl<T> Borrow for T where
T: ?Sized,
[src][−]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][−]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src][−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][−]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src][−]
impl<T> Any for T where
T: 'static + ?Sized,
[src][−]
T: 'static + ?Sized,