[][src]Macro stakker::actor

macro_rules! actor {
    ($core:expr, $type:ident :: $init:ident($($x:expr),*), $notify:expr) => { ... };
    ($core:expr, <$type:ty> :: $init:ident($($x:expr),*), $notify:expr) => { ... };
}

Create a new actor and initialise it

This example is not tested
let actor = actor!(core, Type::init(args...), notify);
let actor = actor!(core, <path::Type>::init(args...), notify);

This may be used when creation and initialisation of the actor can be done together. Otherwise see actor_new!. The actor is created and then the given initialisation function is called asynchronously. The notify argument is a Ret<StopCause> instance to call if the actor is terminated. An ActorOwn reference is returned.

Implemented using ActorOwn::new.