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>
pub fn new( name: EventName, kind: EventKind, source: EventSource, payload: P, ) -> EventEnvelope<P>
pub fn with_id(self, id: impl Into<EventId>) -> EventEnvelope<P>
pub fn with_target(self, target: impl Into<EventTarget>) -> EventEnvelope<P>
pub fn with_metadata(self, metadata: EventMetadata) -> EventEnvelope<P>
pub fn with_timestamp(self, timestamp: EventTimestamp) -> EventEnvelope<P>
Trait Implementations§
Source§impl<P> Clone for EventEnvelope<P>where
P: Clone,
impl<P> Clone for EventEnvelope<P>where
P: Clone,
Source§fn clone(&self) -> EventEnvelope<P>
fn clone(&self) -> EventEnvelope<P>
Returns a duplicate of the value. Read more
1.0.0 · 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 for EventEnvelope<P>where
P: Debug,
impl<P> Debug for EventEnvelope<P>where
P: Debug,
Source§impl<P> PartialEq for EventEnvelope<P>where
P: PartialEq,
impl<P> PartialEq for EventEnvelope<P>where
P: PartialEq,
impl<P> Eq for EventEnvelope<P>where
P: Eq,
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