transferred_core/report.rs
1use std::time::Duration;
2
3/// Severity of a recorded coercion. `Info` = Tier 1 lossless. `Warn` = Tier 2 lossy-structural.
4/// Tier 3 (lossy-semantic) coercions are not recorded — they fail the run via `ElError::Coercion`.
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub enum CoercionLevel {
7 Info,
8 Warn,
9}
10
11/// A single type coercion applied during a run.
12#[derive(Debug, Clone)]
13pub struct Coercion {
14 pub column: String,
15 pub from: String,
16 pub to: String,
17 pub level: CoercionLevel,
18}
19
20/// Post-run statistics returned by `Transfer::run()`.
21#[derive(Debug, Default, Clone)]
22pub struct RunReport {
23 pub rows: u64,
24 pub bytes_written: u64,
25 pub duration: Duration,
26 pub coercions: Vec<Coercion>,
27}