Struct riker::actor::ActorCell [−][src]
pub struct ActorCell<Msg: Message> { /* fields omitted */ }
Methods
impl<Msg> ActorCell<Msg> where
Msg: Message,
[src]
impl<Msg> ActorCell<Msg> where
Msg: Message,
pub fn new(
uid: ActorId,
uri: ActorUri,
parent: Option<ActorRef<Msg>>,
kernel: &KernelRef<Msg>,
system: &ActorSystem<Msg>,
perconf: Option<PersistenceConf>,
mailbox: Option<MailboxSender<Msg>>
) -> ActorCell<Msg>
[src]
pub fn new(
uid: ActorId,
uri: ActorUri,
parent: Option<ActorRef<Msg>>,
kernel: &KernelRef<Msg>,
system: &ActorSystem<Msg>,
perconf: Option<PersistenceConf>,
mailbox: Option<MailboxSender<Msg>>
) -> ActorCell<Msg>
Constructs a new ActorCell
Trait Implementations
impl<Msg: Clone + Message> Clone for ActorCell<Msg>
[src]
impl<Msg: Clone + Message> Clone for ActorCell<Msg>
fn clone(&self) -> ActorCell<Msg>
[src]
fn clone(&self) -> ActorCell<Msg>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<Msg> CellInternal for ActorCell<Msg> where
Msg: Message,
[src]
impl<Msg> CellInternal for ActorCell<Msg> where
Msg: Message,
type Msg = Msg
fn dead_letters(&self) -> &ActorRef<Msg>
[src]
fn dead_letters(&self) -> &ActorRef<Msg>
Return the system's dead letters reference.
fn persistence_conf(&self) -> Option<PersistenceConf>
[src]
fn persistence_conf(&self) -> Option<PersistenceConf>
Return the actor's persistence configuration.
fn is_persisting(&self) -> bool
[src]
fn is_persisting(&self) -> bool
Returns true if the actor is currently in a state of persisting.
fn set_persisting(&self, b: bool)
[src]
fn set_persisting(&self, b: bool)
Sets the persisting status of the actor. Read more
fn identify(&self, sender: Option<ActorRef<Msg>>)
[src]
fn identify(&self, sender: Option<ActorRef<Msg>>)
Invoked when an actor receives an Identify
message. Read more
fn add_child(&self, name: &str, actor: ActorRef<Msg>)
[src]
fn add_child(&self, name: &str, actor: ActorRef<Msg>)
Adds a child under this actor.
fn stop(&self, actor: ActorRef<Msg>)
[src]
fn stop(&self, actor: ActorRef<Msg>)
Send an ActorCmd::Stop
to the given actor.
fn receive_cmd(&self, cmd: ActorCmd, actor: &mut Option<BoxActor<Msg>>)
[src]
fn receive_cmd(&self, cmd: ActorCmd, actor: &mut Option<BoxActor<Msg>>)
Invoked when the actor receives a command. Read more
fn terminate(&self, actor: &mut Option<BoxActor<Msg>>)
[src]
fn terminate(&self, actor: &mut Option<BoxActor<Msg>>)
Terminate the actor associated with this ActorCell
. Read more
fn restart(&self)
[src]
fn restart(&self)
Restart the actor associated with this ActorCell
Read more
fn death_watch(
&self,
terminated: &ActorRef<Msg>,
actor: &mut Option<BoxActor<Msg>>
)
[src]
fn death_watch(
&self,
terminated: &ActorRef<Msg>,
actor: &mut Option<BoxActor<Msg>>
)
Invoked when a child actor is terminated. Read more
fn handle_failure(&self, failed: ActorRef<Msg>, strategy: Strategy)
[src]
fn handle_failure(&self, failed: ActorRef<Msg>, strategy: Strategy)
Invoked when a child actor fails (panics). Read more
fn restart_child(&self, actor: ActorRef<Msg>)
[src]
fn restart_child(&self, actor: ActorRef<Msg>)
Invoked when the supervision strategy restarts a child actor.
fn escalate_failure(&self)
[src]
fn escalate_failure(&self)
Invoked when the supervision strategy escalates an actor's failure.
fn is_child(&self, actor: &ActorRef<Msg>) -> bool
[src]
fn is_child(&self, actor: &ActorRef<Msg>) -> bool
fn load_events(&self, actor: &mut Option<BoxActor<Msg>>) -> bool
[src]
fn load_events(&self, actor: &mut Option<BoxActor<Msg>>) -> bool
Invoked to query an actor's events during actor start. Read more
fn replay(
&self,
ctx: &Context<Msg>,
evts: Vec<Msg>,
actor: &mut Option<BoxActor<Msg>>
)
[src]
fn replay(
&self,
ctx: &Context<Msg>,
evts: Vec<Msg>,
actor: &mut Option<BoxActor<Msg>>
)
Invoked during actor start to complete actor initialization. Read more
impl<Msg> ExecutionContext for ActorCell<Msg> where
Msg: Message,
[src]
impl<Msg> ExecutionContext for ActorCell<Msg> where
Msg: Message,
fn execute<F: Future>(&self, f: F) -> DispatchHandle<F::Item, F::Error> where
F: Future + Send + 'static,
F::Item: Send + 'static,
F::Error: Send + 'static,
[src]
fn execute<F: Future>(&self, f: F) -> DispatchHandle<F::Item, F::Error> where
F: Future + Send + 'static,
F::Item: Send + 'static,
F::Error: Send + 'static,
impl<Msg> TmpActorRefFactory for ActorCell<Msg> where
Msg: Message,
[src]
impl<Msg> TmpActorRefFactory for ActorCell<Msg> where
Msg: Message,
type Msg = Msg
fn tmp_actor_of(
&self,
props: BoxActorProd<Msg>
) -> Result<ActorRef<Msg>, CreateError>
[src]
fn tmp_actor_of(
&self,
props: BoxActorProd<Msg>
) -> Result<ActorRef<Msg>, CreateError>
impl<Msg> Debug for ActorCell<Msg> where
Msg: Message,
[src]
impl<Msg> Debug for ActorCell<Msg> where
Msg: Message,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<Msg> CellPublic for ActorCell<Msg> where
Msg: Message,
[src]
impl<Msg> CellPublic for ActorCell<Msg> where
Msg: Message,
type Msg = Msg
fn myself(&self) -> ActorRef<Msg>
[src]
fn myself(&self) -> ActorRef<Msg>
Returns the actor's ActorRef
fn parent(&self) -> ActorRef<Msg>
[src]
fn parent(&self) -> ActorRef<Msg>
Returns the actor's parent ActorRef
ⓘImportant traits for Box<R>fn children<'a>(&'a self) -> Box<Iterator<Item = ActorRef<Msg>> + 'a>
[src]
fn children<'a>(&'a self) -> Box<Iterator<Item = ActorRef<Msg>> + 'a>
Returns an iterator for the actor's children references
fn is_root(&self) -> bool
[src]
fn is_root(&self) -> bool
fn send_msg(&self, msg: Envelope<Msg>) -> MsgResult<Envelope<Msg>>
[src]
fn send_msg(&self, msg: Envelope<Msg>) -> MsgResult<Envelope<Msg>>
fn send_sys_msg(
&self,
msg: SystemEnvelope<Msg>
) -> MsgResult<SystemEnvelope<Msg>>
[src]
fn send_sys_msg(
&self,
msg: SystemEnvelope<Msg>
) -> MsgResult<SystemEnvelope<Msg>>
impl<'a, Msg> From<&'a ActorCell<Msg>> for Context<Msg> where
Msg: Message,
[src]
impl<'a, Msg> From<&'a ActorCell<Msg>> for Context<Msg> where
Msg: Message,