Skip to main content

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 an 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".

Implementations on Foreign Types§

Source§

impl<T> BugContext for Result<T, Bug>

Source§

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

Implementors§