Struct kay::RawID [−][src]
pub struct RawID {
pub instance_id: u32,
pub type_id: ShortTypeId,
pub machine: MachineID,
pub version: u8,
}A RawID uniquely identifies an Actor, or even a Actor within a Swarm
Fields
instance_id: u32
Used to identify instances within a top-level Actor. The main use-case is
Swarm identifying and dispatching to its Instances using this field
type_id: ShortTypeId
An ID for the type of the identified Actor, used to dispatch messages
to the message handling functions registered for this type
machine: MachineID
ID of the machine (in a computing cluster or multiplayer environment)
that the identified Actor lives on
version: u8
Allows safe reuse of a RawID after Actor/Actor death.
The version is incremented to make the new (otherwise identical) RawID
distinguishable from erroneous references to the Actor/Actor previously identified
Methods
impl RawID[src]
impl RawIDpub fn new(
type_id: ShortTypeId,
instance_id: u32,
machine: MachineID,
version: u8
) -> Self[src]
pub fn new(
type_id: ShortTypeId,
instance_id: u32,
machine: MachineID,
version: u8
) -> SelfCreate a new RawID
pub fn local_broadcast(&self) -> RawID[src]
pub fn local_broadcast(&self) -> RawIDGet a version of an actor RawID that signals that a message
should be delivered to all machine-local instances.
pub fn global_broadcast(&self) -> RawID[src]
pub fn global_broadcast(&self) -> RawIDGet a version of an actor RawID that signals that a message
should be delivered globally (to all instances on all machines).
pub fn is_broadcast(&self) -> bool[src]
pub fn is_broadcast(&self) -> boolCheck whether this RawID signals a local or global broadcast.
pub fn is_global_broadcast(&self) -> bool[src]
pub fn is_global_broadcast(&self) -> boolCheck whether this RawID signals specifically a global broadcast.
Trait Implementations
impl Copy for RawID[src]
impl Copy for RawIDimpl Clone for RawID[src]
impl Clone for RawIDfn clone(&self) -> RawID[src]
fn clone(&self) -> RawIDReturns 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 PartialEq for RawID[src]
impl PartialEq for RawIDfn eq(&self, other: &RawID) -> bool[src]
fn eq(&self, other: &RawID) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &RawID) -> bool[src]
fn ne(&self, other: &RawID) -> boolThis method tests for !=.
impl Eq for RawID[src]
impl Eq for RawIDimpl Hash for RawID[src]
impl Hash for RawIDfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Debug for RawID[src]
impl Debug for RawID