Function error_chain
pub fn error_chain<'a>(
error: &'a (dyn Error + 'static),
) -> impl Iterator<Item = &'a (dyn Error + 'static)>Expand description
Iterate over an error and its sources, visiting at most 64 errors.
The supplied error is the first item and counts toward the limit. The limit bounds cyclic as well as unusually long source chains; repeated errors are not deduplicated. This iterator does not allocate.
Sources are requested only when advancing past the current error, so an early
match does not inspect that error’s source. Only Error::source is followed;
use error_chain_with for errors that expose causes through another API,
or error_chain_with_limit to choose another traversal bound.