linkrs_migration/
progress.rs1use crate::plan::{MigrationPlan, MigrationStep};
2
3pub trait MigrationProgress: Send + Sync {
4 fn on_plan_start(&self, _plan: &MigrationPlan) {}
5 fn on_step_start(&self, _step_idx: usize, _step: &MigrationStep) {}
6 fn on_step_complete(&self, _step_idx: usize, _step: &MigrationStep) {}
7 fn on_row_processed(&self, _rows: u64) {}
8 fn on_plan_complete(&self, _plan: &MigrationPlan, _rows_migrated: u64) {}
9 fn on_error(&self, _error: &str) {}
10}
11
12#[derive(Debug, Clone, Copy)]
13pub struct NoopProgress;
14
15impl MigrationProgress for NoopProgress {}