pub trait DomainEvent {
const KIND: &'static str;
}Expand description
Marker trait for events that can be persisted by the event store.
Each event carries a unique Self::KIND identifier so the repository can
route stored bytes back to the correct type when rebuilding aggregates or
projections.
Most projects implement this trait by hand, but the #[derive(Aggregate)]
macro generates it automatically for the aggregate event enums it creates.
Required Associated Constants§
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.