pub trait Projection: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn process(&self, event: &Event) -> Result<()>;
fn get_state(&self, entity_id: &str) -> Option<Value>;
fn clear(&self);
}Expand description
A projection aggregates events into a queryable view
Required Methods§
Sourcefn process(&self, event: &Event) -> Result<()>
fn process(&self, event: &Event) -> Result<()>
Process an event and update the projection state