pub trait Classify {
// Required method
fn kind(&self) -> ErrorKind;
// Provided methods
fn is_retryable(&self) -> bool { ... }
fn requires_dlq(&self) -> bool { ... }
}Expand description
Fault-domain classification for error types.
Implement kind() only; is_retryable() and requires_dlq() have
correct default implementations derived from kind().
Required Methods§
Provided Methods§
Sourcefn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Returns true if the operation may be retried.
Only ErrorKind::Transient errors are retryable.
Sourcefn requires_dlq(&self) -> bool
fn requires_dlq(&self) -> bool
Returns true if the message should be routed to the Dead Letter Queue.
Only ErrorKind::Corrupt errors require DLQ routing.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".