pub trait ResultExt<T, E1>: Sized {
// Required methods
fn context_and_location<C, E2, E3>(
self,
context: C,
location: Location,
) -> Result<T, E3>
where E1: Into<E2>,
C: ErrorWrap<E2, E3>,
E2: Error,
E3: Error2;
fn with_context_and_location<F, C, E2, E3>(
self,
f: F,
location: Location,
) -> Result<T, E3>
where F: FnOnce() -> C,
E1: Into<E2>,
C: ErrorWrap<E2, E3>,
E2: Error,
E3: Error2;
// Provided methods
fn context<C, E2, E3>(self, context: C) -> Result<T, E3>
where E1: Into<E2>,
C: ErrorWrap<E2, E3>,
E2: Error,
E3: Error2 { ... }
fn with_context<F, C, E2, E3>(self, f: F) -> Result<T, E3>
where F: FnOnce() -> C,
E1: Into<E2>,
C: ErrorWrap<E2, E3>,
E2: Error,
E3: Error2 { ... }
}Required Methods§
fn context_and_location<C, E2, E3>( self, context: C, location: Location, ) -> Result<T, E3>
fn with_context_and_location<F, C, E2, E3>( self, f: F, location: Location, ) -> Result<T, E3>
Provided Methods§
fn context<C, E2, E3>(self, context: C) -> Result<T, E3>
fn with_context<F, C, E2, E3>(self, f: F) -> Result<T, E3>
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.