pub struct DryRunResult {
pub mode: ImportMode,
pub database_is_empty: bool,
pub existing_rows: BTreeMap<String, usize>,
pub would_delete: BTreeMap<String, usize>,
pub would_insert: BTreeMap<String, usize>,
pub would_skip: BTreeMap<String, usize>,
pub would_succeed: bool,
pub failure_reason: Option<String>,
pub warnings: Vec<String>,
}Expand description
Result of a dry-run import preview. Shows what would happen without making any changes.
Fields§
§mode: ImportModeImport mode that would be used.
database_is_empty: boolWhether the database is empty (relevant for Fresh mode).
existing_rows: BTreeMap<String, usize>Number of existing rows per table (before import).
would_delete: BTreeMap<String, usize>Number of rows that would be deleted per table (Replace mode).
would_insert: BTreeMap<String, usize>Number of rows that would be inserted per table.
would_skip: BTreeMap<String, usize>Number of rows that would be skipped per table (Merge mode).
would_succeed: boolWhether the import would succeed with the given mode.
failure_reason: Option<String>Reason for failure if would_succeed is false.
warnings: Vec<String>Any warnings that would be generated.
Implementations§
Source§impl DryRunResult
impl DryRunResult
Sourcepub fn total_would_delete(&self) -> usize
pub fn total_would_delete(&self) -> usize
Total number of rows that would be deleted.
Sourcepub fn total_would_insert(&self) -> usize
pub fn total_would_insert(&self) -> usize
Total number of rows that would be inserted.
Sourcepub fn total_would_skip(&self) -> usize
pub fn total_would_skip(&self) -> usize
Total number of rows that would be skipped.
Sourcepub fn total_existing(&self) -> usize
pub fn total_existing(&self) -> usize
Total existing rows in the database.
Trait Implementations§
Source§impl Clone for DryRunResult
impl Clone for DryRunResult
Source§fn clone(&self) -> DryRunResult
fn clone(&self) -> DryRunResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DryRunResult
impl RefUnwindSafe for DryRunResult
impl Send for DryRunResult
impl Sync for DryRunResult
impl Unpin for DryRunResult
impl UnsafeUnpin for DryRunResult
impl UnwindSafe for DryRunResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more