pub struct ShortEventId(/* private fields */);Expand description
ShortEventId is short (16B) because it is always used in a context of an existing
id::RostraId so even though client might potentially grind collisions
(64-bits of resistance) it really gains them nothing.
One might think of a FullEventId = (RostraId, EventId), where
the RostraId is passed separately or known in the context.
However non-naive applications should probably store event in a smarter way anyway, e.g. by first 8B mapping to a sequence of matching events.
Implementations§
Trait Implementations§
Source§impl Clone for ShortEventId
impl Clone for ShortEventId
impl Copy for ShortEventId
Source§impl Debug for ShortEventId
impl Debug for ShortEventId
Source§impl Default for ShortEventId
impl Default for ShortEventId
Source§impl Display for ShortEventId
impl Display for ShortEventId
impl Eq for ShortEventId
Source§impl From<EventId> for ShortEventId
impl From<EventId> for ShortEventId
Source§impl From<ShortEventId> for NullableShortEventId
impl From<ShortEventId> for NullableShortEventId
Source§fn from(value: ShortEventId) -> Self
fn from(value: ShortEventId) -> Self
Converts to this type from the input type.
Source§impl FromStr for ShortEventId
impl FromStr for ShortEventId
Source§impl Hash for ShortEventId
impl Hash for ShortEventId
Source§impl Ord for ShortEventId
impl Ord for ShortEventId
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 PartialEq for ShortEventId
impl PartialEq for ShortEventId
Source§impl PartialOrd for ShortEventId
impl PartialOrd for ShortEventId
impl StructuralPartialEq for ShortEventId
Auto Trait Implementations§
impl Freeze for ShortEventId
impl RefUnwindSafe for ShortEventId
impl Send for ShortEventId
impl Sync for ShortEventId
impl Unpin for ShortEventId
impl UnsafeUnpin for ShortEventId
impl UnwindSafe for ShortEventId
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