pub trait EffectExecutor: Send + Sync {
// Required method
fn execute(
&self,
effect: Effect,
state: &TuiState,
) -> Pin<Box<dyn Future<Output = Option<Action>> + Send + 'static>>;
}Expand description
Async boundary used by the bounded application loop.
Required Methods§
Sourcefn execute(
&self,
effect: Effect,
state: &TuiState,
) -> Pin<Box<dyn Future<Output = Option<Action>> + Send + 'static>>
fn execute( &self, effect: Effect, state: &TuiState, ) -> Pin<Box<dyn Future<Output = Option<Action>> + Send + 'static>>
Starts one typed effect and optionally returns a typed completion action.
The executor must copy any needed projection data from state before
returning. The returned owned future lets the application loop poll
several effects concurrently without spawning detached tasks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".