Struct robots::actors::actor_cell::ActorCell
[−]
[src]
pub struct ActorCell { /* fields omitted */ }
Main interface for interractiong with an Actor for the internals.
Methods
impl ActorCell
[src]
fn new(
props: Arc<ActorFactory>,
system: ActorSystem,
father: ActorRef,
path: Arc<ActorPath>
) -> ActorCell
[src]
props: Arc<ActorFactory>,
system: ActorSystem,
father: ActorRef,
path: Arc<ActorPath>
) -> ActorCell
Creates a new ActorCell.
fn receive_message(&self, message: InnerMessage, sender: ActorRef)
[src]
Puts a message with its sender in the Actor's mailbox and schedules the Actor.
fn receive_system_message(&self, system_message: SystemMessage)
[src]
Puts a system message with its sender in the Actor's system mailbox and schedules the Actor.
fn handle_envelope(&self)
[src]
Makes the Actor handle an envelope in its mailbox.
Trait Implementations
impl Clone for ActorCell
[src]
fn clone(&self) -> ActorCell
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl ActorContext for ActorCell
[src]
fn actor_ref(&self) -> ActorRef
[src]
Returns an ActorRef to the Actor.
fn actor_of(
&self,
props: Arc<ActorFactory>,
name: String
) -> Result<ActorRef, &'static str>
[src]
&self,
props: Arc<ActorFactory>,
name: String
) -> Result<ActorRef, &'static str>
Spawns a child actor.
fn tell<MessageTo: Message>(&self, to: ActorRef, message: MessageTo)
[src]
Sends a Message to the targeted ActorRef.
fn ask<MessageTo: Message>(
&self,
to: ActorRef,
message: MessageTo,
name: String
) -> ActorRef
[src]
&self,
to: ActorRef,
message: MessageTo,
name: String
) -> ActorRef
Creates a Future, this Future will send the message to the targetted ActorRef (and thus be the sender of the message). Read more
fn complete<MessageTo: Message>(&self, future: ActorRef, complete: MessageTo)
[src]
Completes a Future.
fn forward_result<T: Message>(&self, future: ActorRef, actor: ActorRef)
[src]
Tells a future to forward its result to another Actor. The Future is then dropped. Read more
fn forward_result_to_future<T: Message>(
&self,
future: ActorRef,
actor: ActorRef
)
[src]
&self,
future: ActorRef,
actor: ActorRef
)
Tells a future to forward its result to another Future that will be completed with this result. The Future is then dropped. Read more
fn do_computation<T: Message, F: Fn(Box<Any + Send>, ActorCell) -> T + Send + Sync + 'static>(
&self,
future: ActorRef,
closure: F
)
[src]
&self,
future: ActorRef,
closure: F
)
Sends the Future a closure to apply on its value, the value will be updated with the output of the closure. Read more
fn sender(&self) -> ActorRef
[src]
Returns an Arc to the sender of the message being handled.
fn tell_control(&self, actor: ActorRef, message: ControlMessage)
[src]
Sends a control message to the given actor.
fn stop(&self, actor_ref: ActorRef)
[src]
Requests the targeted actor to stop.
fn kill_me(&self)
[src]
Asks the father of the actor to terminate it.
fn father(&self) -> ActorRef
[src]
Father of the actor.
fn children(&self) -> HashMap<Arc<ActorPath>, ActorRef>
[src]
Children of the actor.
fn monitoring(&self) -> HashMap<Arc<ActorPath>, (ActorRef, FailureHandler)>
[src]
Lifecycle monitoring, list of monitored actors.
fn monitored_by(&self) -> Vec<ActorRef>
[src]
Actors monitoring this actor.
fn monitor(&self, actor: ActorRef, handler: FailureHandler)
[src]
Monitor an actor with the given handler.
fn path(&self) -> Arc<ActorPath>
[src]
Logical path to the actor, such as /user/foo/bar/baz
fn identify_actor(&self, name: String, request_name: String) -> ActorRef
[src]
Future containing an Option with an ActtorRef to the Actor with the given logical path. Read more
fn fail(&self, reason: &'static str)
[src]
Puts the actor in a state of failure with the given reason.