[][src]Trait cqrs_es::Query

pub trait Query<A, E>: Debug + Default + Serialize + DeserializeOwned + Default where
    E: DomainEvent<A>,
    A: Aggregate
{ fn update(&mut self, event: &MessageEnvelope<A, E>); }

Downstream Querys are the read elements in a CQRS system. As events are emitted these queries , or views, are updated to reflect the currente state of the system.

These are regularly a serialized view, usually stored in a standard database, but could also include messaging platform or other asynchronous eventually consistent platforms.

Required methods

fn update(&mut self, event: &MessageEnvelope<A, E>)

Each implemented query is responsible for updating its stated based on events passed via this method.

Loading content...

Implementors

Loading content...