Trait RequestRetryPolicy

Source
pub trait RequestRetryPolicy {
    // Required method
    fn get_next_delay(&mut self, status: StatusCode) -> Option<Duration>;
}
Expand description

Trait for generic retry policies, used with Session::send_with_retry. For simple use cases you can use DefaultRetryPolicy.

Required Methods§

Source

fn get_next_delay(&mut self, status: StatusCode) -> Option<Duration>

Return the time until the next retry, or None if no more retries should be attempted.

Trait Implementations§

Source§

impl RequestRetryPolicy for Box<dyn RequestRetryPolicy + Send>

Source§

fn get_next_delay(&mut self, status: StatusCode) -> Option<Duration>

Return the time until the next retry, or None if no more retries should be attempted.

Implementations on Foreign Types§

Source§

impl RequestRetryPolicy for Box<dyn RequestRetryPolicy + Send>

Implementors§