#[non_exhaustive]pub enum Error {
Execute(Box<dyn StdError + Send + Sync + 'static>),
ExecuteMigration(Box<dyn StdError + Send + Sync + 'static>, MigrationId, bool),
ResolveQuery(String),
Sql(Error),
VersionMissing(i64),
VersionModified(i64, String, String),
VersionNotPresent(i64),
VersionTooOld(i64),
VersionTooNew(i64),
}
Expand description
All the ways the lifecycle of applying migrations can end in failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Execute(Box<dyn StdError + Send + Sync + 'static>)
An error that came from applying migrations.
ExecuteMigration(Box<dyn StdError + Send + Sync + 'static>, MigrationId, bool)
Error from one migration.
ResolveQuery(String)
Error resolving query before migration.
Sql(Error)
Error processing a migration source.
VersionMissing(i64)
A migration found in schema history is missing from the source.
VersionModified(i64, String, String)
The migration content has changed between runs.
VersionNotPresent(i64)
A version specified does not exist in the source.
VersionTooOld(i64)
A version specified is older than would be valid for the operation requested.
VersionTooNew(i64)
A version specified is newer than would be valid for the operation requested.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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