pub trait EventSourced{
type Id: Debug + Clone + Send;
type Event: Debug + Send + Sync + 'static;
const TYPE_NAME: &'static str;
// Required method
fn handle_event(self, event: Self::Event) -> Self;
}Expand description
State and event handling for an EventSourcedEntity.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn handle_event(self, event: Self::Event) -> Self
fn handle_event(self, event: Self::Event) -> Self
The event handler.
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.