[−][src]Macro failure_ext::err_downcast_ref
Downcast matching.
Usage:
let res = err_downcast_ref! { err, ty: Type => { /* use ty as &Type */ }, yours: YourType => { /* use yours as &YourType */ }, };
Where err
is a &anyhow::Error
.
When one of the type arms match, then it returns Some(value from expr), otherwise None.
It's like downcast_ref but for multiple types.