Trait Context

Source
pub trait Context<T> {
    // Required methods
    fn context(self, message: impl Into<String>) -> Result<T>;
    fn with_context(self, message: impl FnOnce() -> String) -> Result<T>;
}

Required Methods§

Source

fn context(self, message: impl Into<String>) -> Result<T>

Source

fn with_context(self, message: impl FnOnce() -> String) -> Result<T>

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> Context<T> for Result<T, E>
where E: Error + 'static,

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here