pub trait Projection {
type Event: DomainEvent;
type Error;
// Required method
fn project(&mut self, event: &Self::Event) -> Result<(), Self::Error>;
}Expand description
English:
Applies domain events to a read model synchronously.
Storage, event ordering, idempotency, and panic conditions belong to the implementation; this trait does not replay or persist events itself.
日本語:
ドメインイベントを読み取りモデルへ同期的に適用します。
保存方法、イベント順序、冪等性、パニック条件は実装が定めます。 このトレイト自体はイベントの再生や永続化を行いません。
Required Associated Types§
Sourcetype Event: DomainEvent
type Event: DomainEvent
English:
Event type used to update the read model.
日本語:
読み取りモデルの更新に使うイベント型です。
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".