tokio_retry

Trait 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

Source§

type Item = R

Source§

type Error = E

Source§

type Future = T