[][src]Trait krill::commons::eventsourcing::EventListener

pub trait EventListener<A: Aggregate>: Send + Sync + 'static {
    fn listen(&self, agg: &A, event: &A::Event);
}

This trait defines a listener for type of events. EventListeners can be registered to an AggregateStore, and will receive all events for the Aggregate as they are being stored.

Note that at this time the events really happened, so EventListeners do not have the luxury of failure in case they do not like what happened.

Required methods

fn listen(&self, agg: &A, event: &A::Event)

Loading content...

Implementors

impl<A: Aggregate> EventListener<A> for EventCounter[src]

impl<S: Signer> EventListener<CertAuth<S>> for EventQueueListener[src]

Implement listening for CertAuth Published events.

Loading content...