pub trait ErrorContext<E: Error>{
// Provided methods
fn context<T>(fun: impl FnOnce() -> Result<T, Self>) -> Result<T, E> { ... }
fn context_async<T, F>(
fun: impl FnOnce() -> F,
) -> impl Future<Output = Result<T, E>>
where F: Future<Output = Result<T, Self>> { ... }
}Provided Methods§
fn context<T>(fun: impl FnOnce() -> Result<T, Self>) -> Result<T, E>
fn context_async<T, F>( fun: impl FnOnce() -> F, ) -> impl Future<Output = Result<T, E>>
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.