EventSourced

Trait EventSourced 

Source
pub trait EventSourced
where Self: Send + Sync + Sized + 'static,
{ 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§

Source

const TYPE_NAME: &'static str

The type name.

Required Associated Types§

Source

type Id: Debug + Clone + Send

The Id type.

Source

type Event: Debug + Send + Sync + 'static

The event type.

Required Methods§

Source

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.

Implementors§