pub trait ResultExt<T> {
// Required methods
fn with_location(self, location: SourceLocation) -> Result<T, ShapeError>;
fn with_context(self, msg: impl Into<String>) -> Result<T, ShapeError>;
}Expand description
Extension trait for Result types to add error context
Required Methods§
fn with_location(self, location: SourceLocation) -> Result<T, ShapeError>
fn with_context(self, msg: impl Into<String>) -> Result<T, ShapeError>
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.