Trait ParseResult

Source
pub trait ParseResult<E> {
    // Required method
    fn parse<F>(self) -> Result<F, Error<E, F::Err>>
       where F: FromStr;
}
Expand description

Extension trait to add parse to Result.

Required Methods§

Source

fn parse<F>(self) -> Result<F, Error<E, F::Err>>
where F: FromStr,

Parses the Result into another type if it’s not already an Err value.

See str::parse for more information and examples.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, E> ParseResult<E> for Result<T, E>
where T: AsRef<str>,

Source§

fn parse<F>(self) -> Result<F, Error<E, F::Err>>
where F: FromStr,

Implementors§