pub trait DetailedError: Error {
// Required methods
fn error_code(&self) -> Cow<'static, str>;
fn error_system(&self) -> Option<Cow<'static, str>>;
fn error_request_id(&self) -> Option<Cow<'static, str>>;
// Provided methods
fn error_fix(&self) -> Option<Cow<'static, str>> { ... }
fn error_next_actions(&self) -> Vec<NextAction> { ... }
}Expand description
Error trait for values that carry structured output-envelope metadata.
Required Methods§
Sourcefn error_code(&self) -> Cow<'static, str>
fn error_code(&self) -> Cow<'static, str>
Stable error code.
Sourcefn error_system(&self) -> Option<Cow<'static, str>>
fn error_system(&self) -> Option<Cow<'static, str>>
Optional backend/system id.
Sourcefn error_request_id(&self) -> Option<Cow<'static, str>>
fn error_request_id(&self) -> Option<Cow<'static, str>>
Optional backend request id.
Provided Methods§
Sourcefn error_fix(&self) -> Option<Cow<'static, str>>
fn error_fix(&self) -> Option<Cow<'static, str>>
Optional recovery hint for the envelope’s top-level fix (defaults to None).
Sourcefn error_next_actions(&self) -> Vec<NextAction>
fn error_next_actions(&self) -> Vec<NextAction>
Structured follow-up actions for the envelope’s next_actions (defaults to empty).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".