Struct robots::actors::props::Props
[−]
[src]
pub struct Props<Args: Arguments, A: Actor> { /* fields omitted */ }Props is the current only ActorFactory.
It is used to generate actors in a reliable way, calling create will always create the same
actor insatance, it is thus the way used to create actors through this crate.
Methods
impl<Args: Arguments, A: Actor> Props<Args, A>[src]
fn new(
creator: Arc<Fn(Args) -> A + Sync + Send>,
args: Args
) -> Arc<ActorFactory>[src]
creator: Arc<Fn(Args) -> A + Sync + Send>,
args: Args
) -> Arc<ActorFactory>
Creates a Props which is a factory for A with the creator function and args args.
Trait Implementations
impl<Args: Arguments, A: Actor> ActorFactory for Props<Args, A>[src]
fn create(&self) -> Arc<Actor>[src]
Creates an Actor instance with the creator function and the args args.
This is meant to allow to respawn an Actor when it fails.