pub trait DomainEvent:
Clone
+ Send
+ 'static {
// Provided methods
fn tags(&self) -> Vec<String> { ... }
fn correlation_id(&self) -> Option<&str> { ... }
}Expand description
A persisted fact. Supplies optional metadata the read side needs:
DomainEvent::tags— categorization keys forevents_by_tagsubscriptions inatomr_persistence_query::ReadJournal.DomainEvent::correlation_id— threads related events across aggregates so acrate::saga::Sagacan correlate them.
Provided Methods§
Tags applied to this event in the journal. Default: none. Tags are how readers subscribe to categories of events instead of specific persistence ids.
Sourcefn correlation_id(&self) -> Option<&str>
fn correlation_id(&self) -> Option<&str>
Correlation id used by sagas / process managers to thread related events together. Default: none — no correlation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.