tokio_retry2

Trait Action

source
pub trait Action {
    type Future: Future<Output = Result<Self::Item, RetryError<Self::Error>>>;
    type Item;
    type Error;

    // Required method
    fn run(&mut self) -> Self::Future;
}
Expand description

An action can be run multiple times and produces a future.

Required Associated Types§

source

type Future: Future<Output = Result<Self::Item, RetryError<Self::Error>>>

The future that this action produces.

source

type Item

The item that the future may resolve with.

source

type Error

The error that the future may resolve with.

Required Methods§

source

fn run(&mut self) -> Self::Future

Implementors§

source§

impl<R, E, T: Future<Output = Result<R, Error<E>>>, F: FnMut() -> T> Action for F

source§

type Item = R

source§

type Error = E

source§

type Future = T