Trait riker::actor::ActorRefFactory [−][src]
pub trait ActorRefFactory { type Msg: Message; fn actor_of(
&self,
props: BoxActorProd<Self::Msg>,
name: &str
) -> Result<ActorRef<Self::Msg>, CreateError>; fn stop(&self, actor: &ActorRef<Self::Msg>); }
Produces ActorRef
s. actor_of
blocks on the current thread until
the actor has successfully started or failed to start.
It is advised to return from the actor's factory method quickly and
handle any initialization in the actor's pre_start
method, which is
invoked after the ActorRef
is returned.
Associated Types
Required Methods
fn actor_of(
&self,
props: BoxActorProd<Self::Msg>,
name: &str
) -> Result<ActorRef<Self::Msg>, CreateError>
&self,
props: BoxActorProd<Self::Msg>,
name: &str
) -> Result<ActorRef<Self::Msg>, CreateError>