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§
Sourcefn on_sync_start(&self)
fn on_sync_start(&self)
Called when the sync operation starts.
Sourcefn on_source_start(&self, source_name: &str)
fn on_source_start(&self, source_name: &str)
Called when a specific source starts syncing.
Sourcefn on_source_success(&self, source_name: &str, count: usize)
fn on_source_success(&self, source_name: &str, count: usize)
Called when a source successfully syncs.
Sourcefn on_source_error(&self, source_name: &str, error: &AdvisoryError)
fn on_source_error(&self, source_name: &str, error: &AdvisoryError)
Called when a source fails to sync.
Sourcefn on_sync_complete(&self, stats: &SyncStats)
fn on_sync_complete(&self, stats: &SyncStats)
Called when the sync operation completes.