[−][src]Struct clap::OsValues
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_usage("<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> Iterator for OsValues<'a>
[src][+]
impl<'a> ExactSizeIterator for OsValues<'a>
[src][+]
impl<'a> DoubleEndedIterator for OsValues<'a>
[src][+]
impl<'a> Default for OsValues<'a>
[src][+]
impl<'a> Clone for OsValues<'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,