pub enum MigrationError {
NewerThanCurrent {
on_disk: u32,
current: u32,
},
NoStepFor(u32),
Step {
from: u32,
message: String,
},
Deserialize(Error),
}Expand description
Errors surfaced by Migrator::run.
Variants§
NewerThanCurrent
The on-disk version number exceeds T::CURRENT_VERSION; the
file was written by a newer build and cannot be read safely.
NoStepFor(u32)
The chain is missing a step for the encountered version, making
it impossible to reach T::CURRENT_VERSION.
Step
A migration step closure returned Err(message).
Deserialize(Error)
The migrated toml::Value did not deserialize as T.
Trait Implementations§
Source§impl Debug for MigrationError
impl Debug for MigrationError
Source§impl Display for MigrationError
impl Display for MigrationError
Source§impl Error for MigrationError
impl Error for MigrationError
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 Freeze for MigrationError
impl RefUnwindSafe for MigrationError
impl Send for MigrationError
impl Sync for MigrationError
impl Unpin for MigrationError
impl UnsafeUnpin for MigrationError
impl UnwindSafe for MigrationError
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