pub struct RunId(/* private fields */);Expand description
Identifies a single run.
Backed by a version 4 (random) UUID. Serializes as its UUID string, so a recorded run identity reads the same in the event log as it does anywhere else the UUID appears.
§Purity
RunId::new draws randomness to mint a fresh UUID, so it is an explicit
constructor the caller invokes on purpose, and it sits behind the default-on
rng feature. Nothing else in this crate draws randomness; the event types
never generate identity on their own. A build with --no-default-features
(the wasm32 build) drops new entirely, which is how the crate proves it
contains no randomness source.
Implementations§
Source§impl RunId
impl RunId
Sourcepub fn new() -> RunId
pub fn new() -> RunId
Mints a fresh, random run identifier.
This draws from the system random source, so treat it as a deliberate
side effect at the edge of the runtime, never something the pure event
or replay paths reach for. It lives behind the rng feature because the
underlying getrandom source does not build for
wasm32-unknown-unknown.