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

pub trait ActorRefFactory {
    pub fn actor_of_props<A>(
        &self,
        name: &str,
        props: BoxActorProd<A>
    ) -> Result<ActorRef<A::Msg>, CreateError>
    where
        A: Actor
;
pub fn actor_of<A>(
        &self,
        name: &str
    ) -> Result<ActorRef<<A as Actor>::Msg>, CreateError>
    where
        A: ActorFactory + Actor
;
pub fn actor_of_args<A, Args>(
        &self,
        name: &str,
        args: Args
    ) -> Result<ActorRef<<A as Actor>::Msg>, CreateError>
    where
        Args: ActorArgs,
        A: ActorFactoryArgs<Args>
;
pub 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

pub fn actor_of_props<A>(
    &self,
    name: &str,
    props: BoxActorProd<A>
) -> Result<ActorRef<A::Msg>, CreateError> where
    A: Actor
[src]

pub fn actor_of<A>(
    &self,
    name: &str
) -> Result<ActorRef<<A as Actor>::Msg>, CreateError> where
    A: ActorFactory + Actor
[src]

pub fn actor_of_args<A, Args>(
    &self,
    name: &str,
    args: Args
) -> Result<ActorRef<<A as Actor>::Msg>, CreateError> where
    Args: ActorArgs,
    A: ActorFactoryArgs<Args>, 
[src]

pub fn stop(&self, actor: impl ActorReference)[src]

Loading content...

Implementors

impl ActorRefFactory for ActorSystem[src]

impl<'_> ActorRefFactory for &'_ ActorSystem[src]

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

Loading content...