pub struct EventId<I> {
pub expiry: u64,
pub nonce: I,
}Expand description
The nonce field of an EventId must be unique, and is usually randomly generated.
Fields§
§expiry: u64Expiration time since UNIX epoch (in nanoseconds).
nonce: IUnique identifier of an event.
Implementations§
Trait Implementations§
Source§impl<I: CandidType> CandidType for EventId<I>
impl<I: CandidType> CandidType for EventId<I>
Source§impl<'de, I> Deserialize<'de> for EventId<I>where
I: Deserialize<'de>,
impl<'de, I> Deserialize<'de> for EventId<I>where
I: Deserialize<'de>,
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<I: Ord> Ord for EventId<I>
impl<I: Ord> Ord for EventId<I>
1.21.0 · 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
Source§impl<I: PartialOrd> PartialOrd for EventId<I>
impl<I: PartialOrd> PartialOrd for EventId<I>
impl<I: Copy> Copy for EventId<I>
impl<I: Eq> Eq for EventId<I>
impl<I> StructuralPartialEq for EventId<I>
Auto Trait Implementations§
impl<I> Freeze for EventId<I>where
I: Freeze,
impl<I> RefUnwindSafe for EventId<I>where
I: RefUnwindSafe,
impl<I> Send for EventId<I>where
I: Send,
impl<I> Sync for EventId<I>where
I: Sync,
impl<I> Unpin for EventId<I>where
I: Unpin,
impl<I> UnwindSafe for EventId<I>where
I: UnwindSafe,
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