pub struct SubstrateFault {
pub code: &'static str,
pub message: String,
pub remediation: String,
pub context: Box<ErrorContext>,
}Expand description
A substrate failure, flattened at the trait boundary so the §2 error contract (stable code + remediation) crosses it intact whatever error enum the provider uses internally.
Fields§
§code: &'static str§message: String§remediation: String§context: Box<ErrorContext>Implementations§
Source§impl SubstrateFault
impl SubstrateFault
pub fn from_fault(fault: &dyn Fault) -> Self
Trait Implementations§
Source§impl Debug for SubstrateFault
impl Debug for SubstrateFault
Source§impl Display for SubstrateFault
impl Display for SubstrateFault
Source§impl Error for SubstrateFault
impl Error for SubstrateFault
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl Fault for SubstrateFault
impl Fault for SubstrateFault
Source§fn remediation(&self) -> String
fn remediation(&self) -> String
How to proceed: a concrete command, flag, or fix.
Source§fn context(&self) -> ErrorContext
fn context(&self) -> ErrorContext
Structured observables for agents (
command, log_path, log_tail, …).Auto Trait Implementations§
impl Freeze for SubstrateFault
impl RefUnwindSafe for SubstrateFault
impl Send for SubstrateFault
impl Sync for SubstrateFault
impl Unpin for SubstrateFault
impl UnsafeUnpin for SubstrateFault
impl UnwindSafe for SubstrateFault
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more