pub fn retry_if<A: Action, C>(action: A, condition: C) -> RetryIf<A, C>
    where C: Condition<A::Error>
{
    Strategy::default().retry_if(action, condition)
}
/// Run the given action, and retry on failure if the error satisfies a given condition.
///
/// Uses the default retry strategy with exponential backoff and a maximum of 5 retry attempts.
///
/// To customize the retry strategy, take a look at [`Strategy`](./struct.Strategy.html).
///
/// # Example
///
/// ```rust
/// # extern crate futures;
/// # extern crate futures_backoff;
/// # use std::io::{Error, ErrorKind};
/// # use futures::{Future, future};
/// # use futures_backoff::retry_if;
/// #
/// # fn main() {
/// let future = retry_if(|| {
///     // do some real-world stuff here...
///     future::ok(42)
/// }, |err: &Error| err.kind() == ErrorKind::TimedOut);
/// #
/// # assert_eq!(future.wait().unwrap(), 42);
/// # }
/// ```
Run the given action, and retry on failure if the error satisfies a given condition.
Uses the default retry strategy with exponential backoff and a maximum of 5 retry attempts.

To customize the retry strategy, take a look at [`Strategy`](./struct.Strategy.html).
Run the given action and retry on failure if the error satisfies a given condition . Uses the default retry strategy with exponential backoff and a maximum of 5 retry attempts . To customize the retry strategy take a look at [ ` Strategy ` ] ( . / struct . Strategy . html ) .
pub fn retry_if<A: Action, C>(action: A, condition: C) -> RetryIf<A, C>
    where C: Condition<A::Error>
{
    Strategy::default().retry_if(action, condition)
}
pub fn retry_if < A : Action , C > ( action : A , condition : C ) -> RetryIf < A , C > where C : Condition < A :: Error > { Strategy :: default ( ) . retry_if ( action , condition ) }
Run the given action, and retry on failure if the error satisfies a given condition.
Run the given action and retry on failure if the error satisfies a given condition .
action
A
condition
C
example
None
extern crate futures;
None
extern crate futures_backoff;
None
use std::io::{error, errorkind};
None
use futures::{future, future};
None
use futures_backoff::retry_if;
None
fn main() {
let future = retry_if(|| {
do some real-world stuff here
future::ok(42)
}, |err: &Error| err.kind() == ErrorKind::TimedOut).
let future = retry_if ( || { do some real - world stuff here future :: ok ( 42 ) } |err : &Error| err . kind () == ErrorKind :: TimedOut ) .
assert_eq!(future.wait().unwrap(), 42);
None
}
None