pub type ParseWarning = Arc<dyn Error + Send + Sync + 'static>;Expand description
A reference-counted, type-erased warning value.
Any type that implements core::error::Error + Send + Sync + 'static can be
wrapped in a ParseWarning. The built-in library variants use EdidWarning, but
custom handlers may push their own error types without wrapping them in EdidWarning.
Using Arc (rather than Box) means ParseWarning is
Clone, which lets warnings be copied from a parsed representation into
DisplayCapabilities without consuming the parsed result.
To inspect a specific variant, use the inherent downcast_ref method available on
dyn core::error::Error + Send + Sync + 'static in std builds:
for w in caps.iter_warnings() {
if let Some(ew) = (**w).downcast_ref::<EdidWarning>() { ... }
}Aliased Typeยง
pub struct ParseWarning { /* private fields */ }