[−][src]Struct simpleargs::Value
A handle for getting the value associated with a named flag.UsageError
This handle can only be used once, and is consumed.
Methods
impl<'a, T> Value<'a, T> where
T: Iterator,
<T as Iterator>::Item: ArgString,
[src]
T: Iterator,
<T as Iterator>::Item: ArgString,
pub fn as_str(self) -> Result<&'a str, OptionError>
[src]
Get the associated value as a string.
Note that ownership of the string is not passed. Ownership is kept by the NamedArgument so it can be attached to error messages.
Returns an error if the user did not supply a value.
pub fn as_osstr(self) -> Result<&'a OsStr, OptionError>
[src]
Get the associated value as an OsStr.
Note that ownership of the string is not passed. Ownership is kept by the NamedArgument so it can be attached to error messages.
Returns an error if the user did not supply a value.
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Value<'a, T> where
T: RefUnwindSafe,
<T as Iterator>::Item: RefUnwindSafe,
T: RefUnwindSafe,
<T as Iterator>::Item: RefUnwindSafe,
impl<'a, T> Send for Value<'a, T> where
T: Send,
<T as Iterator>::Item: Send,
T: Send,
<T as Iterator>::Item: Send,
impl<'a, T> Sync for Value<'a, T> where
T: Sync,
<T as Iterator>::Item: Sync,
T: Sync,
<T as Iterator>::Item: Sync,
impl<'a, T> Unpin for Value<'a, T>
impl<'a, T> !UnwindSafe for Value<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,