pub trait Fault: Error {
// Required methods
fn code(&self) -> &'static str;
fn remediation(&self) -> String;
// Provided methods
fn step(&self) -> Option<&str> { ... }
fn instance(&self) -> Option<&str> { ... }
fn context(&self) -> ErrorContext { ... }
}Expand description
Implemented by every error enum in every stackless crate.
A new error variant is only complete when its remediation text says what the operator should actually do (ARCHITECTURE.md §8).
Required Methods§
Sourcefn remediation(&self) -> String
fn remediation(&self) -> String
How to proceed: a concrete command, flag, or fix.
Provided Methods§
Sourcefn context(&self) -> ErrorContext
fn context(&self) -> ErrorContext
Structured observables for agents (command, log_path, log_tail, …).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".