Skip to main content

ResultExt

Trait ResultExt 

Source
pub trait ResultExt<T> {
    // Required methods
    fn wrap(self) -> Result<T, Error>;
    fn context<C: Display + Send + Sync + 'static>(
        self,
        ctx: C,
    ) -> Result<T, Error>;
}

Required Methods§

Source

fn wrap(self) -> Result<T, Error>

Source

fn context<C: Display + Send + Sync + 'static>(self, ctx: C) -> Result<T, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E: Error + Send + Sync + 'static> ResultExt<T> for Result<T, E>

Source§

fn wrap(self) -> Result<T, Error>

Source§

fn context<C: Display + Send + Sync + 'static>(self, ctx: C) -> Result<T, Error>

Implementors§