Trait ErrorExt

Source
pub trait ErrorExt<T> {
    // Required method
    fn or_err(self, s: impl ToString) -> Result<T, Error>;
}

Required Methods§

Source

fn or_err(self, s: impl ToString) -> Result<T, Error>

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> ErrorExt<T> for Option<T>

Source§

fn or_err(self, s: impl ToString) -> Result<T, Error>

Source§

impl<T, E> ErrorExt<T> for Result<T, E>
where E: Into<Error> + Display,

Source§

fn or_err(self, s: impl ToString) -> Result<T, Error>

Implementors§