pub trait WithContext<T> {
// Required method
fn with_context(self, ctx: &str) -> Result<T>;
}Expand description
Attach a context string to a Result, wrapping the error in a new
General message that includes the original error’s display text.
Required Methods§
Sourcefn with_context(self, ctx: &str) -> Result<T>
fn with_context(self, ctx: &str) -> Result<T>
Wrap any error with an additional context prefix.