SyncObserver

Trait SyncObserver 

Source
pub trait SyncObserver: Send + Sync {
    // Required methods
    fn on_sync_start(&self);
    fn on_source_start(&self, source_name: &str);
    fn on_source_success(&self, source_name: &str, count: usize);
    fn on_source_error(&self, source_name: &str, error: &AdvisoryError);
    fn on_sync_complete(&self, stats: &SyncStats);
}
Expand description

Observer for monitoring sync progress and events.

Required Methods§

Source

fn on_sync_start(&self)

Called when the sync operation starts.

Source

fn on_source_start(&self, source_name: &str)

Called when a specific source starts syncing.

Source

fn on_source_success(&self, source_name: &str, count: usize)

Called when a source successfully syncs.

Source

fn on_source_error(&self, source_name: &str, error: &AdvisoryError)

Called when a source fails to sync.

Source

fn on_sync_complete(&self, stats: &SyncStats)

Called when the sync operation completes.

Implementors§