Trait ming::ValueExt[][src]

pub trait ValueExt: Sealed {
    fn parse<T: FromStr>(&self) -> Result<T, Error>
    where
        T::Err: Into<Box<dyn Error + Send + Sync + 'static>>
;
fn parse_with<F, T, E>(&self, func: F) -> Result<T, Error>
    where
        F: FnOnce(&str) -> Result<T, E>,
        E: Into<Box<dyn Error + Send + Sync + 'static>>
; }
Expand description

An optional extension trait with methods for parsing OsStrings.

They may fail in two cases:

If parsing fails the error will be wrapped in lexopt’s own Error type.

Required methods

Decode the value and parse it using FromStr.

This will fail if the value is not valid unicode or if the subsequent parsing fails.

Decode the value and parse it using a custom function.

Implementations on Foreign Types

Implementors