pub struct InstanceId(/* private fields */);Expand description
Instance identifier - represents a specific running instance of a service
Instances use 128-bit UUIDs for globally unique identification
Implementations§
Source§impl InstanceId
impl InstanceId
Sourcepub fn new_random() -> Self
pub fn new_random() -> Self
Create a new random instance ID using UUID v4
Sourcepub fn from_bytes(bytes: [u8; 16]) -> Self
pub fn from_bytes(bytes: [u8; 16]) -> Self
Create from bytes
Trait Implementations§
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
Source§impl From<InstanceId> for u128
impl From<InstanceId> for u128
Source§fn from(id: InstanceId) -> u128
fn from(id: InstanceId) -> u128
Converts to this type from the input type.
Source§impl From<u128> for InstanceId
impl From<u128> for InstanceId
Source§fn from(id: u128) -> InstanceId
fn from(id: u128) -> InstanceId
Converts to this type from the input type.
Source§impl Hash for InstanceId
impl Hash for InstanceId
Source§impl PartialEq for InstanceId
impl PartialEq for InstanceId
Source§impl Serialize for InstanceId
impl Serialize for InstanceId
impl Copy for InstanceId
impl Eq 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