pub trait ErrorCode: Error {
// Required method
fn error_code(&self) -> Cow<'static, str>;
}Expand description
An Error extension trait that allows simplified error codes to be submitted in telemetry.
Required Methods§
Sourcefn error_code(&self) -> Cow<'static, str>
fn error_code(&self) -> Cow<'static, str>
Return the error code for the given error.