Trait adaptive_backoff::adaptive::Adaptable [−][src]
The Adaptive trait defines sucess and fail methods which are used to tune a backoff time.
Required methods
Loading content...Implementors
impl<B: Backoff> Adaptable for Adaptive<B>
[src]
fn success(&mut self) -> Duration
[src]
success resets the backoff, increases success factor by the success multiplier and reduces the new returned delay.
fn fail(&mut self) -> Duration
[src]
fail uses the backoff and adds it, divided by the fail factor, to the running delay. It then returns the running delay.