fn get_source_error_type<T: Error + 'static>(err: &dyn Error) -> Option<&T>
Downcasts the given err source into T.