Action

Type Alias Action 

Source
pub type Action<A> = Box<dyn for<'a> FnOnce(&'a mut A) -> ActorFut<'a, ()> + Send + 'static>;
Expand description

An action scheduled onto an actor.

This is a boxed closure that receives a mutable reference to the actor instance and returns a boxed future to execute. The future typically returns anyhow::Result<T>, but T is generic here to support helper adapters.

Aliased Typeยง

pub struct Action<A>(/* private fields */);