[][src]Struct kay::World

pub struct World(_);

A handle representing an ActorSystem that exposes a safe subset of functionality to be used within actor message handlers - for communication with other actors.

Methods

impl World[src]

pub fn send<M: Message>(&mut self, receiver: RawID, message: M)[src]

Send a message to a RawID

pub fn local_first<A: ActorOrActorTrait>(&mut self) -> RawID[src]

Get the RawID of the first local actor of a certain type (Note: no such actor might exist)

pub fn global_first<A: ActorOrActorTrait>(&mut self) -> RawID[src]

Get the RawID of the first global actor (among all network peers) of a certain type (Note: no such actor might exist)

pub fn local_broadcast<A: ActorOrActorTrait>(&mut self) -> RawID[src]

Get a RawID for a broadcast to all local actors of a certain type

pub fn global_broadcast<A: ActorOrActorTrait>(&mut self) -> RawID[src]

Get a RawID for a broadcast to all global actors (across all network peers) of a certain type

pub fn allocate_instance_id<A: 'static + Actor>(&mut self) -> RawID[src]

Allocate a new instance id to be used by a to-be-spawned actor

pub fn local_machine_id(&mut self) -> MachineID[src]

Get the machine ID of this system in the network

pub fn panic_happened(&self) -> bool[src]

Returns whether the system is in a panicked state

pub fn get_actor_name(&mut self, type_id: ShortTypeId) -> &str[src]

Get the name of an actor class by type ID

Trait Implementations

impl Send for World[src]

impl Sync for World[src]

Auto Trait Implementations

impl !RefUnwindSafe for World

impl Unpin for World

impl !UnwindSafe for World

Blanket Implementations

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

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

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

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.