pub enum MigrateError {
NotAPackage {
path: PathBuf,
},
SealedPackage {
path: PathBuf,
},
Io {
path: PathBuf,
source: Error,
},
NotUtf8 {
file: String,
},
UnmigratableValue {
file: String,
line: usize,
key: &'static str,
value: String,
},
PackageDoesNotLoad {
source: SchemaLoadError,
},
RewriteLeavesViolations {
source: SchemaLoadError,
},
Unfaithful {
detail: String,
},
}Expand description
Why a migration could not be computed or written.
Variants§
NotAPackage
SealedPackage
Io
NotUtf8
UnmigratableValue
PackageDoesNotLoad
The package fails to load even under the tolerant sealed-style read that translates every retired key — so something other than a retired key is wrong, and rewriting spellings would not help.
Fields
§
source: SchemaLoadErrorRewriteLeavesViolations
The rewrite still refuses under the strict authoring read. The rewriter reached every key it can (block-style, unquoted); what remains is a spelling it does not edit.
Fields
§
source: SchemaLoadErrorUnfaithful
The rewrite loads but resolves differently from the loader’s own translation of the original — an internal defect, never an authoring problem. Nothing is written.
Trait Implementations§
Source§impl Debug for MigrateError
impl Debug for MigrateError
Source§impl Display for MigrateError
impl Display for MigrateError
Source§impl Error for MigrateError
impl Error for MigrateError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for MigrateError
impl !UnwindSafe for MigrateError
impl Freeze for MigrateError
impl Send for MigrateError
impl Sync for MigrateError
impl Unpin for MigrateError
impl UnsafeUnpin for MigrateError
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