Skip to main content

DomainEvent

Trait DomainEvent 

Source
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:

Provided Methods§

Source

fn tags(&self) -> Vec<String>

Tags applied to this event in the journal. Default: none. Tags are how readers subscribe to categories of events instead of specific persistence ids.

Source

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.

Implementors§