pub trait ErrorCode {
// Required method
fn error_code(&self) -> &'static str;
}Expand description
Error code for external reference (e.g., documentation).
Required Methods§
Sourcefn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Get a unique error code for this error type.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".