Trait messages::actor::RuntimeActorExt [−][src]
pub trait RuntimeActorExt: Actor { fn spawn(self) -> Address<Self> { ... } fn create_and_spawn<F>(f: F) -> Address<Self>
where
F: FnOnce(&Context<Self>) -> Self + Send, { ... } }
This is supported on crate features
runtime-tokio
or runtime-async-std
only.Expand description
Extension trait for Actor
providing more convenient interface when
one of the runtime features is enabled.
Provided methods
Spawns an actor using supported runtime.
Returns an address of this actor.
Same as Actor::create_and_run
, but spawns
the future instead of returning it.
Returns an address of this actor.