Trait HasRetryTime

Source
pub trait HasRetryTime {
    // Required method
    fn retry_time(&self) -> RetryTime;

    // Provided method
    fn abs_retry_time<F>(&self, now: Instant, choose_delay: F) -> AbsRetryTime
       where F: FnOnce() -> Duration,
             Self: Sized { ... }
}
Expand description

Trait for an error object that can tell us when the operation which generated it can be retried.

Required Methods§

Source

fn retry_time(&self) -> RetryTime

Return the time when the operation that gave this error can be retried.

See all caveats and explanations on RetryTime.

Provided Methods§

Source

fn abs_retry_time<F>(&self, now: Instant, choose_delay: F) -> AbsRetryTime
where F: FnOnce() -> Duration, Self: Sized,

Return an absolute retry when the operation that gave this error can be retried.

Requires that now is the current time, and choose_delay is a function to choose a delay for RetryTime::AfterWaiting.

Implementors§

impl HasRetryTime for IntroduceAckStatus

impl HasRetryTime for Error

impl HasRetryTime for ProxyError

impl HasRetryTime for Error

impl HasRetryTime for Error

impl HasRetryTime for PickGuardError

impl HasRetryTime for FailedAttemptError

impl HasRetryTime for InvalidTarget

impl HasRetryTime for PtError