Action

Trait Action 

pub trait Action {
    type Future: Future<Output = Result<Self::Item, Error<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§

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

The future that this action produces.

type Item

The item that the future may resolve with.

type Error

The error that the future may resolve with.

Required Methods§

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

Implementors§

§

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

§

type Item = R

§

type Error = E

§

type Future = T