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

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

Associated Types

type Msg: Message

Loading content...

Required methods

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

fn stop(&self, actor: &ActorRef<Self::Msg>)

Loading content...

Implementors

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

type Msg = Msg

impl<Msg> ActorRefFactory for ActorSystem<Msg> where
    Msg: Message
[src]

type Msg = Msg

Loading content...