#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MigrationReport {
pub reindexed: usize,
pub skipped: usize,
pub failures: Vec<MigrationRowFailure>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct MigrationRowFailure {
pub id: String,
pub error: String,
}
#[cfg(test)]
mod migration_error_tests {
use super::*;
#[test]
fn migration_variants_are_constructible() {
let _refused: super::super::Error = super::super::Error::MigrationRefused {
offending: vec!["id".to_string()],
};
let _incomplete: super::super::Error = super::super::Error::MigrationIncomplete {
report: MigrationReport {
reindexed: 0,
skipped: 0,
failures: vec![MigrationRowFailure {
id: "id".to_string(),
error: "e".to_string(),
}],
},
};
}
}