pub struct InstanceId(/* private fields */);Expand description
Unique identifier for a runtime instance.
This is a UUID-based identifier that uniquely identifies a running instance of the active message runtime. It is used for:
- Transport-level addressing
- Discovery registration
- Routing table management
Implementations§
Source§impl InstanceId
impl InstanceId
Sourcepub fn new_v4() -> Self
pub fn new_v4() -> Self
Create a new random v4 InstanceId.
This is exposed for testing and special cases. In production, use
[InstanceFactory::create()] instead.
Trait Implementations§
Source§impl AsRef<Uuid> for InstanceId
impl AsRef<Uuid> for InstanceId
Source§impl Clone for InstanceId
impl Clone for InstanceId
Source§fn clone(&self) -> InstanceId
fn clone(&self) -> InstanceId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InstanceId
Source§impl Debug for InstanceId
impl Debug for InstanceId
Source§impl<'de> Deserialize<'de> for InstanceId
impl<'de> Deserialize<'de> for InstanceId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for InstanceId
impl Display for InstanceId
impl Eq for InstanceId
Source§impl From<&InstanceId> for WorkerId
impl From<&InstanceId> for WorkerId
Source§fn from(id: &InstanceId) -> Self
fn from(id: &InstanceId) -> Self
Derive WorkerId from InstanceId using xxh3_64 hash.
This is the canonical way to compute WorkerId - it should never be constructed any other way to ensure consistency.
Source§impl From<InstanceId> for Uuid
impl From<InstanceId> for Uuid
Source§fn from(id: InstanceId) -> Self
fn from(id: InstanceId) -> Self
Converts to this type from the input type.
Source§impl From<InstanceId> for WorkerId
impl From<InstanceId> for WorkerId
Source§fn from(id: InstanceId) -> Self
fn from(id: InstanceId) -> Self
Converts to this type from the input type.
Source§impl From<Uuid> for InstanceId
impl From<Uuid> for InstanceId
Source§impl Hash for InstanceId
impl Hash for InstanceId
Source§impl PartialEq for InstanceId
impl PartialEq for InstanceId
Source§fn eq(&self, other: &InstanceId) -> bool
fn eq(&self, other: &InstanceId) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InstanceId
impl Serialize for InstanceId
impl StructuralPartialEq for InstanceId
Auto Trait Implementations§
impl Freeze for InstanceId
impl RefUnwindSafe for InstanceId
impl Send for InstanceId
impl Sync for InstanceId
impl Unpin for InstanceId
impl UnsafeUnpin for InstanceId
impl UnwindSafe for InstanceId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more