Struct kay::World [−][src]
pub struct World(_);
Gives limited access to an ActorSystem
(typically
from inside, in a message handler) to identify other actors and send messages to them.
Methods
impl World
[src]
impl World
pub fn send<M: Message>(&mut self, receiver: RawID, message: M)
[src]
pub fn send<M: Message>(&mut self, receiver: RawID, message: M)
Send a message to a (sub-)actor with the given RawID.
world.send(child_id, Update { dt: 1.0 });
pub fn local_first<A: Actor>(&mut self) -> RawID
[src]
pub fn local_first<A: Actor>(&mut self) -> RawID
Get the RawID of the first machine-local instance of an actor.
pub fn global_first<A: Actor>(&mut self) -> RawID
[src]
pub fn global_first<A: Actor>(&mut self) -> RawID
Get the RawID of the first instance of an actor on machine 0
pub fn local_broadcast<A: Actor>(&mut self) -> RawID
[src]
pub fn local_broadcast<A: Actor>(&mut self) -> RawID
Get the RawID for a broadcast to all machine-local instances of an actor.
pub fn global_broadcast<A: Actor>(&mut self) -> RawID
[src]
pub fn global_broadcast<A: Actor>(&mut self) -> RawID
Get the RawID for a global broadcast to all instances of an actor on all machines.
pub fn allocate_instance_id<A: 'static + Actor>(&mut self) -> RawID
[src]
pub fn allocate_instance_id<A: 'static + Actor>(&mut self) -> RawID
Synchronously allocate a instance id for a instance that will later manually be added to a Swarm
pub fn local_machine_id(&mut self) -> MachineID
[src]
pub fn local_machine_id(&mut self) -> MachineID
Get the id of the machine that we're currently in
pub fn shutdown(&mut self)
[src]
pub fn shutdown(&mut self)
Signal intent to shutdown the actor system