pub struct Event<T> {
pub aggregate_id: Uuid,
pub event_id: u64,
pub created_at: DateTime<Utc>,
pub user_id: Option<String>,
pub payload: T,
}Expand description
Represents a single event
Besides from the payload, the event structure contains some additional helpful fields
Fields§
§aggregate_id: UuidThe id of the aggregate this event belongs to
event_id: u64The id of this particular event. Events always use a numbered sequence starting from 1
created_at: DateTime<Utc>When this event did happen
user_id: Option<String>An optional reference to the user who caused this event
payload: TThe event payload
Implementations§
Source§impl<T: Debug> Event<T>
impl<T: Debug> Event<T>
pub fn list_builder() -> EventListBuilder<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Event<T>where
T: Freeze,
impl<T> RefUnwindSafe for Event<T>where
T: RefUnwindSafe,
impl<T> Send for Event<T>where
T: Send,
impl<T> Sync for Event<T>where
T: Sync,
impl<T> Unpin for Event<T>where
T: Unpin,
impl<T> UnwindSafe for Event<T>where
T: 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