Skip to main content

ReconnectBackoff

Trait ReconnectBackoff 

Source
pub trait ReconnectBackoff {
    // Required method
    fn reconnect_backoff(&mut self, reconnection_attempt: u32) -> Duration;
}
Expand description

Calculates backoff duration between socket reconnection attempts.

Required Methods§

Source

fn reconnect_backoff(&mut self, reconnection_attempt: u32) -> Duration

Returns the backoff duration to wait before the next reconnection attempt.

Implementors§