pub struct ReschedulePolicyBuilder { /* private fields */ }
Expand description
Builder for ReschedulePolicy
.
Implementations§
Source§impl ReschedulePolicyBuilder
impl ReschedulePolicyBuilder
Sourcepub fn attempts(&mut self, value: Option<i64>) -> &mut Self
pub fn attempts(&mut self, value: Option<i64>) -> &mut Self
Attempts limits the number of rescheduling attempts that can occur in an interval.
Sourcepub fn interval(&mut self, value: Option<TimeDelta>) -> &mut Self
pub fn interval(&mut self, value: Option<TimeDelta>) -> &mut Self
Interval is a duration in which we can limit the number of reschedule attempts.
Sourcepub fn delay(&mut self, value: Option<TimeDelta>) -> &mut Self
pub fn delay(&mut self, value: Option<TimeDelta>) -> &mut Self
Delay is a minimum duration to wait between reschedule attempts. The delay function determines how much subsequent reschedule attempts are delayed by.
Sourcepub fn delay_function(&mut self, value: Option<String>) -> &mut Self
pub fn delay_function(&mut self, value: Option<String>) -> &mut Self
DelayFunction determines how the delay progressively changes on subsequent reschedule attempts. Valid values are “exponential”, “constant”, and “fibonacci”.
Sourcepub fn max_delay(&mut self, value: Option<TimeDelta>) -> &mut Self
pub fn max_delay(&mut self, value: Option<TimeDelta>) -> &mut Self
MaxDelay is an upper bound on the delay.
Sourcepub fn unlimited(&mut self, value: Option<bool>) -> &mut Self
pub fn unlimited(&mut self, value: Option<bool>) -> &mut Self
Unlimited allows rescheduling attempts until they succeed
Sourcepub fn build(&self) -> Result<ReschedulePolicy, ReschedulePolicyBuilderError>
pub fn build(&self) -> Result<ReschedulePolicy, ReschedulePolicyBuilderError>
Trait Implementations§
Source§impl Clone for ReschedulePolicyBuilder
impl Clone for ReschedulePolicyBuilder
Source§fn clone(&self) -> ReschedulePolicyBuilder
fn clone(&self) -> ReschedulePolicyBuilder
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 moreAuto Trait Implementations§
impl Freeze for ReschedulePolicyBuilder
impl RefUnwindSafe for ReschedulePolicyBuilder
impl Send for ReschedulePolicyBuilder
impl Sync for ReschedulePolicyBuilder
impl Unpin for ReschedulePolicyBuilder
impl UnwindSafe for ReschedulePolicyBuilder
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