pub trait Event {
const SCHEMA: EventSchema;
// Required methods
fn domain_identifiers(&self) -> DomainIdentifierSet;
fn name(&self) -> &'static str;
}Expand description
Represents an event in the event store.
An event is an occurrence or action of interest within the system. It can be persisted and retrieved from
the event store. The Event trait provides methods for retrieving domain identifiers associated with the event
and getting the event’s name. The constant SCHEMA holds the name and the domain identifiers of all supported events.
Required Associated Constants§
Sourceconst SCHEMA: EventSchema
const SCHEMA: EventSchema
Returns the schema of all supported events.
Required Methods§
Sourcefn domain_identifiers(&self) -> DomainIdentifierSet
fn domain_identifiers(&self) -> DomainIdentifierSet
Retrieves the domain identifiers associated with the event.
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.