BugContext

Trait BugContext 

Source
pub trait BugContext: Sealed {
    // Required method
    fn bug_context<D: Display>(self, prefix: D) -> Self;
}
Expand description

Extension trait for .bug_context() on Result

Required Methods§

Source

fn bug_context<D: Display>(self, prefix: D) -> Self

Adds context to a internal error or bug

Prepends prepend + ": " to the error message, if it’s an error ([Bug]).

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> BugContext for Result<T, Bug>

Source§

fn bug_context<D: Display>(self, prefix: D) -> Self

Implementors§