VersionedEvent

Trait VersionedEvent 

Source
pub trait VersionedEvent: Event {
    // Required methods
    fn version(&self) -> u32;
    fn event_type(&self) -> &'static str;
}
Available on crate feature cqrs only.
Expand description

Trait for versioned events

Required Methods§

Source

fn version(&self) -> u32

Get the version number of this event

Source

fn event_type(&self) -> &'static str

Get the event type name (for serialization)

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§