Trait tokio_retry::Action

source ·
pub trait Action {
    type Future: Future<Output = Result<Self::Item, 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, 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, E>>, F: FnMut() -> T> Action for F

§

type Item = R

§

type Error = E

§

type Future = T