pub struct BackOffOptions {
pub type_: Option<String>,
pub delay: Option<i64>,
}Expand description
Detailed backoff configuration.
Pair with BackOffJobOptions::Opts or crate::QueueOpts’s default_backoff field.
§Built-in strategies
type_ | Formula |
|---|---|
"exponential" | 2^attempt * delay_ms |
"fixed" | delay_ms (constant) |
Custom strategies can be registered on a queue via
crate::Queue::register_backoff_strategy.
Fields§
§type_: Option<String>Name of the backoff strategy. Built-ins: "exponential", "fixed".
delay: Option<i64>Base delay in milliseconds used by the strategy formula.
Trait Implementations§
Source§impl Clone for BackOffOptions
impl Clone for BackOffOptions
Source§fn clone(&self) -> BackOffOptions
fn clone(&self) -> BackOffOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackOffOptions
impl Debug for BackOffOptions
Source§impl<'de> Deserialize<'de> for BackOffOptions
impl<'de> Deserialize<'de> for BackOffOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for BackOffOptions
impl Hash for BackOffOptions
Source§impl PartialEq for BackOffOptions
impl PartialEq for BackOffOptions
Source§impl Serialize for BackOffOptions
impl Serialize for BackOffOptions
impl Eq for BackOffOptions
impl StructuralPartialEq for BackOffOptions
Auto Trait Implementations§
impl Freeze for BackOffOptions
impl RefUnwindSafe for BackOffOptions
impl Send for BackOffOptions
impl Sync for BackOffOptions
impl Unpin for BackOffOptions
impl UnsafeUnpin for BackOffOptions
impl UnwindSafe for BackOffOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.