Struct ExecutionId
pub struct ExecutionId(/* private fields */);
Expand description
An Id uniquely identifying an execution.
An ExecutionId
should never be re-used as it’s used to collect metadata about the execution and to generate
TraceId
s which need to be globally unique.
Implementations§
§impl ExecutionId
impl ExecutionId
pub fn random(rng: &mut impl Rng) -> ExecutionId
pub fn random(rng: &mut impl Rng) -> ExecutionId
Uses a random generator to generate the ExecutionId
.
pub const fn from_raw(raw: u128) -> ExecutionId
pub const fn from_raw(raw: u128) -> ExecutionId
Creates an ExecutionId
from a raw value, extra care needs to be taken that this is not a constant value or
re-used in any way.
When possible prefer using ExecutionId::random
.
Trait Implementations§
§impl Clone for ExecutionId
impl Clone for ExecutionId
§fn clone(&self) -> ExecutionId
fn clone(&self) -> ExecutionId
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 more§impl Debug for ExecutionId
impl Debug for ExecutionId
§impl Default for ExecutionId
impl Default for ExecutionId
§fn default() -> ExecutionId
fn default() -> ExecutionId
Returns the “default value” for a type. Read more
§impl Deref for ExecutionId
impl Deref for ExecutionId
§impl<'de> Deserialize<'de> for ExecutionId
impl<'de> Deserialize<'de> for ExecutionId
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExecutionId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for ExecutionId
impl Hash for ExecutionId
§impl PartialEq for ExecutionId
impl PartialEq for ExecutionId
§impl Serialize for ExecutionId
impl Serialize for ExecutionId
§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 ExecutionId
impl Eq for ExecutionId
impl StructuralPartialEq for ExecutionId
Auto Trait Implementations§
impl Freeze for ExecutionId
impl RefUnwindSafe for ExecutionId
impl Send for ExecutionId
impl Sync for ExecutionId
impl Unpin for ExecutionId
impl UnwindSafe for ExecutionId
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