pub struct ProcessId(u128);Expand description
A globally-unique id identifying a process.
The primary purpose of this id is to provide a globally-unique context within which
ThreadIds and SpanContexts are guaranteed to be unique. On a normal operating system
that is the process, on other systems it should be whatever is the closest equivalent, e.g. for
most embedded setups it should be unique for each time the system is restarted.
Tuple Fields§
§0: u128Implementations§
Source§impl ProcessId
impl ProcessId
Sourcepub fn random(rng: &mut impl Rng) -> ProcessId
pub fn random(rng: &mut impl Rng) -> ProcessId
Uses a random number generator to generate the ProcessId.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ProcessId
impl<'de> Deserialize<'de> for ProcessId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ProcessId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ProcessId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ProcessId
impl Ord for ProcessId
Source§impl PartialOrd for ProcessId
impl PartialOrd for ProcessId
Source§impl Serialize for ProcessId
impl Serialize for ProcessId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ProcessId
impl Eq for ProcessId
impl StructuralPartialEq for ProcessId
Auto Trait Implementations§
impl Freeze for ProcessId
impl RefUnwindSafe for ProcessId
impl Send for ProcessId
impl Sync for ProcessId
impl Unpin for ProcessId
impl UnwindSafe for ProcessId
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