pub trait RetryClassifier: Send + Sync {
// Required method
fn classify(&self, error: &KernelError) -> RetryClass;
}Expand description
Classify a KernelError as transient or permanent.
Hosts can implement this trait to inject transport-specific knowledge
(e.g. mapping HTTP 5xx onto Transient and 4xx onto Permanent). The
crate ships DefaultRetryClassifier as a starting point that covers
every current KernelError variant.
Required Methods§
Sourcefn classify(&self, error: &KernelError) -> RetryClass
fn classify(&self, error: &KernelError) -> RetryClass
Return the retry verdict for error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".