Struct retry::Retry [] [src]

pub struct Retry<'a, F: FnMut() -> R + 'a, G: FnMut(&R) -> bool + 'a, R> { /* fields omitted */ }

Builder object for a retryable operation.

Methods

impl<'a, F: FnMut() -> R, G: FnMut(&R) -> bool, R> Retry<'a, F, G, R>
[src]

Builds a new Retry object.

Begins executing the retryable operation.

Sets the maximum number of milliseconds retries will be made before failing.

Sets the maximum number of tries to make before failing.

Sets the number of milliseconds to wait between tries.

Mutually exclusive with wait_between and wait_exponentially.

Sets a range for a randomly chosen number of milliseconds to wait between tries. A new random value from the range is chosen for each try.

Mutually exclusive with wait and wait_exponentially.

Sets a multiplier in milliseconds to use in exponential backoff between tries.

Mutually exclusive with wait and wait_between.

Trait Implementations

impl<'a, F: Debug + FnMut() -> R + 'a, G: Debug + FnMut(&R) -> bool + 'a, R: Debug> Debug for Retry<'a, F, G, R>
[src]

Formats the value using the given formatter.