[−][src]Macro witcher::match_err
Match on error types.
This only works with errors implementing the std::error::Error
trait as it makes use of
the standard is
and downcast_ref
implementations.
Examples
use witcher::prelude::*; let err = std::io::Error::new(std::io::ErrorKind::Other, "oh no!"); let res = match_err!(&err, { _x: std::io::Error => true, _ => false }); assert!(res);