keri_core::processor

Trait Processor

Source
pub trait Processor {
    type Database: EventDatabase;

    // Required methods
    fn process_notice(&self, notice: &Notice) -> Result<(), Error>;
    fn register_observer(
        &mut self,
        observer: Arc<dyn Notifier + Send + Sync>,
        notifications: &[JustNotification],
    ) -> Result<(), Error>;

    // Provided method
    fn process(&self, msg: &Message) -> Result<(), Error> { ... }
}

Required Associated Types§

Required Methods§

Source

fn process_notice(&self, notice: &Notice) -> Result<(), Error>

Source

fn register_observer( &mut self, observer: Arc<dyn Notifier + Send + Sync>, notifications: &[JustNotification], ) -> Result<(), Error>

Provided Methods§

Source

fn process(&self, msg: &Message) -> Result<(), Error>

Implementors§