pub struct Caused { /* private fields */ }Expand description
A report’s frames as an ordinary error chain.
A Report keeps its frames itself, and Error::source has to hand back
something with a life of its own, so the chain is copied out where a report
crosses into a set. One link per context, carrying the attachments that were
put on it - the key, the file, the engine’s own words - so a caller who
walks the chain and prints it gets what the report holds without knowing
there is a report.
The outermost context is left out: whoever carries this says it already, and printing it again is the duplicate line this exists to remove. What was attached to it is kept and moves down onto the first link that is a cause, so no link is facts with nothing that failed above them - a reader walking causes should meet causes. Only where the outermost is the sole context do the facts stand on their own, because then there is nothing to move them to.
Implementations§
Trait Implementations§
Source§impl Error for Caused
impl Error for Caused
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()