archivist_lib::events::router

Trait EventConsumer

Source
pub trait EventConsumer {
    // Required method
    fn handle(self: Arc<Self>, event: Event);
}
Expand description

Trait implemented by data types which receive events.

Required Methods§

Source

fn handle(self: Arc<Self>, event: Event)

Event consumers will receive a call on this method when an event they are interested on happens.

Implementors§