pub struct DelayBuilder { /* private fields */ }Implementations§
Source§impl DelayBuilder
impl DelayBuilder
Sourcepub fn with(self, other: Delay) -> Self
pub fn with(self, other: Delay) -> Self
Add a delay to the current builder. If a builder implements multiple delays, they will run sequentially, so if you have 2 Throttle delays, they will wait one after the other. This composer can be used though with a Throttle and a Timeout to throttle a thread, and error out if it throttles too long.
pub fn timeout(self, timeout: Duration) -> Self
pub fn throttle(self, throttle: Duration) -> Self
pub fn exponential_backoff(self, initial: Duration, multiplier: f32) -> Self
pub fn exponential_backoff_capped( self, initial: Duration, multiplier: f32, cap: Duration, ) -> Self
pub fn side_effect<F>(self, function: F) -> Self
pub fn build(self) -> Delay
Auto Trait Implementations§
impl Freeze for DelayBuilder
impl !RefUnwindSafe for DelayBuilder
impl Send for DelayBuilder
impl !Sync for DelayBuilder
impl Unpin for DelayBuilder
impl !UnwindSafe for DelayBuilder
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