Skip to main content

Module backoff

Module backoff 

Source
Expand description

Helpers for retrying a fallible operation according to a backoff schedule.

Runner::run retries the specified operation according to the BackoffSchedule of the Runner. Users can customize the backoff behavior by implementing BackoffSchedule.

Re-exportsยง

use std::pin::Pin; ๐Ÿ”’
use futures::future::FusedFuture; ๐Ÿ”’
use tor_rtcompat::TimeoutError; ๐Ÿ”’
use super::*; ๐Ÿ”’

Structsยง

Runner ๐Ÿ”’
A runner for a fallible operation, which retries on failure according to a BackoffSchedule.

Enumsยง

BackoffError ๐Ÿ”’
The type of error encountered while running a fallible operation.

Traitsยง

BackoffSchedule ๐Ÿ”’
A trait that specifies the parameters for retrying a fallible operation.
RetriableError ๐Ÿ”’
A trait for representing retriable errors.

Functionsยง

optionally_timeout ๐Ÿ”’
Wrap a Future with an optional timeout.