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>>>
type Future: Future<Output = Result<Self::Item, Error<Self::Error>>>
The future that this action produces.
type Item
type Item
The item that the future may resolve with.
type Error
type Error
The error that the future may resolve with.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".