[][src]Trait riker::actor::ActorRefFactory

pub trait ActorRefFactory {
    fn actor_of<A>(
        &self,
        props: BoxActorProd<A>,
        name: &str
    ) -> Result<ActorRef<A::Msg>, CreateError>
    where
        A: Actor
;
fn stop(&self, actor: impl ActorReference); }

Produces ActorRefs. 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.

Required methods

fn actor_of<A>(
    &self,
    props: BoxActorProd<A>,
    name: &str
) -> Result<ActorRef<A::Msg>, CreateError> where
    A: Actor

fn stop(&self, actor: impl ActorReference)

Loading content...

Implementors

impl ActorRefFactory for ActorSystem[src]

impl<Msg: Message> ActorRefFactory for Context<Msg>[src]

Loading content...