#[repr(transparent)]pub struct QueryId(pub [u8; 16]);Expand description
Identifies one query execution.
Random 128-bit identifier drawn from the operating-system CSPRNG by
new_random; never derived only from timestamps and
never reused within a database. The all-zero value is reserved.
Canonical text form: strict lowercase hexadecimal, 32 characters.
Parsing is lenient and additionally accepts the hyphenated UUID form
(8-4-4-4-12) and uppercase hex digits.
Tuple Fields§
§0: [u8; 16]Implementations§
Source§impl QueryId
impl QueryId
Sourcepub const ZERO: Self
pub const ZERO: Self
The all-zero identifier (reserved; never produced by
Self::new_random in practice).
Sourcepub fn new_random() -> Self
pub fn new_random() -> Self
Draws a fresh random identifier from the operating-system CSPRNG. Never derived only from timestamps; with 128 random bits the result is never reused within a database.
Sourcepub const fn from_bytes(bytes: [u8; 16]) -> Self
pub const fn from_bytes(bytes: [u8; 16]) -> Self
Wraps raw bytes without copying.
Trait Implementations§
impl Copy for QueryId
Source§impl<'de> Deserialize<'de> for QueryId
impl<'de> Deserialize<'de> for QueryId
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>,
Human-readable deserializers accept any string spelling
accepted by FromStr; binary deserializers expect the
compact 16-byte newtype form.