pub struct EventEnvelope<P> {
pub id: EventId,
pub name: EventName,
pub kind: EventKind,
pub source: EventSource,
pub target: Option<EventTarget>,
pub timestamp: EventTimestamp,
pub metadata: EventMetadata,
pub payload: P,
}Fields§
§id: EventId§name: EventName§kind: EventKind§source: EventSource§target: Option<EventTarget>§timestamp: EventTimestamp§metadata: EventMetadata§payload: PImplementations§
Source§impl<P> EventEnvelope<P>
impl<P> EventEnvelope<P>
Sourcepub fn new(
name: EventName,
kind: EventKind,
source: EventSource,
payload: P,
) -> Self
pub fn new( name: EventName, kind: EventKind, source: EventSource, payload: P, ) -> Self
pub fn with_id(self, id: impl Into<EventId>) -> Self
pub fn with_target(self, target: impl Into<EventTarget>) -> Self
pub fn with_metadata(self, metadata: EventMetadata) -> Self
pub fn with_timestamp(self, timestamp: EventTimestamp) -> Self
Trait Implementations§
Source§impl<P: Clone> Clone for EventEnvelope<P>
impl<P: Clone> Clone for EventEnvelope<P>
Source§fn clone(&self) -> EventEnvelope<P>
fn clone(&self) -> EventEnvelope<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<P: Debug> Debug for EventEnvelope<P>
impl<P: Debug> Debug for EventEnvelope<P>
Source§impl<P: PartialEq> PartialEq for EventEnvelope<P>
impl<P: PartialEq> PartialEq for EventEnvelope<P>
Source§fn eq(&self, other: &EventEnvelope<P>) -> bool
fn eq(&self, other: &EventEnvelope<P>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<P: Eq> Eq for EventEnvelope<P>
impl<P> StructuralPartialEq for EventEnvelope<P>
Auto Trait Implementations§
impl<P> Freeze for EventEnvelope<P>where
P: Freeze,
impl<P> RefUnwindSafe for EventEnvelope<P>where
P: RefUnwindSafe,
impl<P> Send for EventEnvelope<P>where
P: Send,
impl<P> Sync for EventEnvelope<P>where
P: Sync,
impl<P> Unpin for EventEnvelope<P>where
P: Unpin,
impl<P> UnsafeUnpin for EventEnvelope<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for EventEnvelope<P>where
P: 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