pub struct EventId(/* private fields */);Expand description
The identity of a record: 128 bits of the BLAKE3 hash of the source’s name and the record’s raw bytes.
It depends on nothing else, so a record delivered again, or collected again, gets the same identity and can be dropped as a duplicate. Two records with identical bytes from one source are the same record.
The hash is cryptographic on purpose. Whoever writes the logs chooses the bytes, and with a hash built only for speed they could craft a record whose identity equals that of another, and have storage drop one of the two as a duplicate.
Implementations§
Trait Implementations§
impl Copy for EventId
Source§impl<'de> Deserialize<'de> for EventId
impl<'de> Deserialize<'de> for EventId
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for EventId
Source§impl Ord for EventId
impl Ord for EventId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for EventId
impl PartialOrd for EventId
Source§impl Serialize for EventId
As its hexadecimal text, so that it reads the same in JSON as in logs.
impl Serialize for EventId
As its hexadecimal text, so that it reads the same in JSON as in logs.
impl StructuralPartialEq for EventId
Auto Trait Implementations§
impl Forget for EventId
impl Freeze for EventId
impl Move for EventId
impl RefUnwindSafe for EventId
impl Send for EventId
impl Sync for EventId
impl Unpin for EventId
impl UnsafeUnpin for EventId
impl UnwindSafe for EventId
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