Skip to main content

EventListener

Trait EventListener 

Source
pub trait EventListener: Send + Sync {
    // Required methods
    fn on_event_received(&self, event: &SyncEvent);
    fn on_event_applied(&self, event: &SyncEvent, result: &ApplyResult);
    fn on_conflict_detected(&self, event: &SyncEvent, conflict_type: &str);
}
Expand description

Event listener for synchronization events.

Required Methods§

Source

fn on_event_received(&self, event: &SyncEvent)

Called when an event is about to be applied.

Source

fn on_event_applied(&self, event: &SyncEvent, result: &ApplyResult)

Called after an event was successfully applied.

Source

fn on_conflict_detected(&self, event: &SyncEvent, conflict_type: &str)

Called when a conflict is detected.

Implementors§