[][src]Struct clap::OsValues

pub struct OsValues<'a> { /* fields omitted */ }

An iterator for getting multiple values out of an argument via the ArgMatches::values_of_os method. Usage of this iterator allows values which contain invalid UTF-8 code points unlike Values.

Examples

use std::ffi::OsString;
use std::os::unix::ffi::{OsStrExt,OsStringExt};

let m = App::new("utf8")
    .arg(Arg::from("<arg> 'some arg'"))
    .get_matches_from(vec![OsString::from("myprog"),
                            // "Hi {0xe9}!"
                            OsString::from_vec(vec![b'H', b'i', b' ', 0xe9, b'!'])]);
assert_eq!(&*m.value_of_os("arg").unwrap().as_bytes(), [b'H', b'i', b' ', 0xe9, b'!']);

Trait Implementations

impl<'a> Clone for OsValues<'a>[src]

impl<'_> Default for OsValues<'_>[src]

Creates an empty iterator.

impl<'a> DoubleEndedIterator for OsValues<'a>[src]

impl<'a> ExactSizeIterator for OsValues<'a>[src]

impl<'a> Iterator for OsValues<'a>[src]

type Item = &'a OsStr

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for OsValues<'a>

impl<'a> Send for OsValues<'a>

impl<'a> Sync for OsValues<'a>

impl<'a> Unpin for OsValues<'a>

impl<'a> UnwindSafe for OsValues<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

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?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.