pub trait WithErrorCode<E> {
// Required method
fn with_code(self, code: impl Into<String>) -> CodedError<E>;
}Expand description
Extension trait for adding error codes
Required Methods§
Sourcefn with_code(self, code: impl Into<String>) -> CodedError<E>
fn with_code(self, code: impl Into<String>) -> CodedError<E>
Attach an error code to an error
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".