[][src]Struct riker::actor::Props

pub struct Props;

Provides instances of ActorProducer for use when creating Actors (actor_of).

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.

Methods

impl Props[src]

pub fn new<A, F>(creator: F) -> Arc<Mutex<impl ActorProducer<Actor = A>>> where
    A: Actor + Send + 'static,
    F: Fn() -> A + Send + 'static, 
[src]

Creates an ActorProducer with no factory method parameters.

pub fn new_args<A, Args, F>(
    creator: F,
    args: Args
) -> Arc<Mutex<impl ActorProducer<Actor = A>>> where
    A: Actor + Send + 'static,
    Args: ActorArgs + 'static,
    F: Fn(Args) -> A + Send + 'static, 
[src]

Creates an ActorProducer with one or more factory method parameters.

Auto Trait Implementations

impl Sync for Props

impl Send for Props

impl Unpin for Props

impl RefUnwindSafe for Props

impl UnwindSafe for Props

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]