Enum background_jobs::Backoff [−][src]
Expand description
Different styles for retrying jobs
Variants
Linear(usize)
Tuple Fields
0: usize
Seconds between execution
For example, Backoff::Linear(5)
will retry a failed job 5 seconds after the previous
attempt
Exponential(usize)
Tuple Fields
0: usize
Base for seconds between execution
For example, Backoff::Exponential(2)
will retry a failed job 2 seconds after the first
failure, 4 seconds after the second failure, 8 seconds after the third failure, and 16
seconds after the fourth failure
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Backoff, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Backoff, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Backoff
impl UnwindSafe for Backoff
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more