[−][src]Trait riker::actor::ActorProducer
Represents the underlying Actor factory function for creating instances of Actor
.
Actors are not created directly. Instead you provide an ActorProducer
that allows the ActorSystem
to start an actor when actor_of
is used,
or when an actor fails and a supervisor requests an actor to be restarted.
ActorProducer
can hold values required by the actor's factory method
parameters.
Associated Types
Required Methods
fn produce(&self) -> Self::Actor
Produces an instance of an Actor
.
The underlying factory method provided
in the original Props::new(f: Fn() -> A + Send
) or
Props::new(f: Fn(Args) -> A + Send>, args: Args)
is called.
Any parameters Args
will be cloned and passed to the function.
Panics
If the provided factory method panics the panic will be caught
by the system, resulting in an error result returning to actor_of
.
Implementations on Foreign Types
impl<A> ActorProducer for Arc<Mutex<Box<ActorProducer<Actor = A>>>> where
A: Actor + Send + 'static,
[src]
impl<A> ActorProducer for Arc<Mutex<Box<ActorProducer<Actor = A>>>> where
A: Actor + Send + 'static,
impl<A> ActorProducer for Arc<Mutex<ActorProducer<Actor = A>>> where
A: Actor + Send + 'static,
[src]
impl<A> ActorProducer for Arc<Mutex<ActorProducer<Actor = A>>> where
A: Actor + Send + 'static,
impl<A> ActorProducer for Box<ActorProducer<Actor = A>> where
A: Actor + Send + 'static,
[src]
impl<A> ActorProducer for Box<ActorProducer<Actor = A>> where
A: Actor + Send + 'static,