Trait ResultExt

Source
pub trait ResultExt<T> {
    // Required methods
    fn api_context(self, _: impl Display) -> Result<T>;
    fn api_with_context<F, C>(self, _: F) -> Result<T>
       where F: FnOnce() -> C,
             C: Display;
}

Required Methods§

Source

fn api_context(self, _: impl Display) -> Result<T>

Source

fn api_with_context<F, C>(self, _: F) -> Result<T>
where F: FnOnce() -> C, C: Display,

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> ResultExt<T> for Result<T, Error<ErrorResponse>>

Source§

fn api_context(self, ctx: impl Display) -> Result<T>

Source§

fn api_with_context<F, C>(self, f: F) -> Result<T>
where F: FnOnce() -> C, C: Display,

Implementors§