Projection

Trait Projection 

Source
pub trait Projection: Send + Sync {
    type Event: Event;

    // Required method
    fn apply(&mut self, event: &Self::Event);
}
Available on crate feature cqrs only.
Expand description

Trait for Projections - read models built from events

Required Associated Types§

Source

type Event: Event

The event type this projection handles

Required Methods§

Source

fn apply(&mut self, event: &Self::Event)

Apply an event to update the projection state

Implementors§