Trait WithContextUntyped

Source
pub trait WithContextUntyped<T>: Sized {
    // Required methods
    fn context_ut(self, loc: &'static str) -> Result<T>;
    fn with_context_ut<F>(self, loc: &'static str, f: F) -> Result<T>
       where F: FnOnce() -> Option<Box<[(&'static str, String)]>>;
}
Expand description

A trait to add context to a result without a specific error type.

Required Methods§

Source

fn context_ut(self, loc: &'static str) -> Result<T>

Add a context to the result.

Source

fn with_context_ut<F>(self, loc: &'static str, f: F) -> Result<T>
where F: FnOnce() -> Option<Box<[(&'static str, String)]>>,

Add a context to the result with additional arguments.

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.

Implementors§

Source§

impl<T, E: Display> WithContextUntyped<T> for Result<T, E>