pub trait DecrustResultExt<T, EOrig> {
// Required methods
fn decrust_context_msg(self, message: &str) -> Result<T, DecrustError>;
fn decrust_context_msg_owned(
self,
message: String,
) -> Result<T, DecrustError>;
fn decrust_context_rich(
self,
context: ErrorContext,
) -> Result<T, DecrustError>;
}
Expand description
Extension trait for Result types to add context to errors
This trait provides methods to add context to errors in a Result, making it easier to provide additional information about the error.
This trait is object-safe and can be used with dynamic dispatch.