#[non_exhaustive]pub struct MigrationReport {
pub rows_rewritten: u64,
pub dry_run: bool,
pub first_row_v1_chain_hash: String,
pub first_row_v2_chain_hash: String,
}Expand description
Summary of a migrate_v1_to_v2 run.
Marked #[non_exhaustive] so future fields (e.g. a per-row error
list, an aborted-row count) can be added without breaking callers
that pattern-match.
Serialize enables provenance migrate --mode json (#204) — the
wire form is {"rows_rewritten": N, "dry_run": bool, "first_row_v1_chain_hash": "...", "first_row_v2_chain_hash": "..."}.
§Wire-format stability (post-#208 self-review §1)
Once a release ships with the Serialize derive, the field
names below become part of the public API. Renaming a field is
then a semver minor bump and warrants a CHANGELOG [BREAKING] note;
new fields are still safe (per #[non_exhaustive]).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rows_rewritten: u64Number of rows rewritten (or that WOULD be rewritten under
dry_run).
dry_run: boolWhether this was a dry-run preview (true) or a live rewrite
(false).
first_row_v1_chain_hash: StringStored this_hash of the first input row (the v1 chain anchor).
"GENESIS" is reported as the literal "GENESIS" when the log
was empty.
first_row_v2_chain_hash: StringRecomputed this_hash of the first migrated row under the v2
canonicalization. Equal to Self::first_row_v1_chain_hash
only if the input was already v2 (idempotent case).
Trait Implementations§
Source§impl Clone for MigrationReport
impl Clone for MigrationReport
Source§fn clone(&self) -> MigrationReport
fn clone(&self) -> MigrationReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more