pub trait ErrorValue:
Send
+ Sync
+ Debug {
// Required methods
fn type_name(&self) -> &str;
fn display(&self) -> String;
// Provided methods
fn structural_props(&self) -> Vec<(&'static str, String)> { ... }
fn as_any(&self) -> Option<&dyn Any> { ... }
}Expand description
Minimal view of a Bock error that the adaptive handler needs.
type_name + structural_props feed the pin key per Q6 of the
2026-04-20 spec amendment. display feeds the provider prompt and
the ErrorOccurrence history.
Required Methods§
Provided Methods§
Sourcefn structural_props(&self) -> Vec<(&'static str, String)>
fn structural_props(&self) -> Vec<(&'static str, String)>
Structural properties that affect recovery choice.
Example for an HTTP error: [("status_class", "5xx")]. Per Q6
these are the properties that discriminate recovery
decisions — value-level fields like an exact timeout duration
are intentionally excluded so
ConnectionTimeout{after: 30s} and
ConnectionTimeout{after: 45s} pin together.