Skip to main content

IsFailure

Trait IsFailure 

Source
pub trait IsFailure:
    Send
    + Sync
    + 'static {
    // Required method
    fn is_failure(&self, err: &(dyn Error + 'static)) -> bool;
}
Expand description

failure classification Does this error consume an attempt? asynq’s Config.IsFailure generalizes what surveyed policy behavior adopted as the one-off Outcome::RateLimited: returning false re-queues the job WITHOUT incrementing attempt and without polluting queue failure statistics. Upstream rate limits, planned maintenance windows, and “not my turn yet” all belong here rather than burning a retry budget that exists for real failures.

Required Methods§

Source

fn is_failure(&self, err: &(dyn Error + 'static)) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§