pub enum MigrateError {
Redb {
path: PathBuf,
source: Error,
},
RedbTx {
path: PathBuf,
source: TransactionError,
},
RedbTable {
path: PathBuf,
source: TableError,
},
RedbCommit {
path: PathBuf,
source: CommitError,
},
Persy(String),
Postcard(Error),
Io(Error),
Json(Error),
TargetExists(PathBuf),
Unsupported {
from: Backend,
to: Backend,
},
InvalidBackend(String),
}Expand description
All migration error variants.
Uses thiserror for idiomatic error definitions. Each variant carries
enough context to be useful in CLI output (path, backend, underlying error).
Variants§
Redb
RedbTx
RedbTable
RedbCommit
Persy(String)
Postcard(Error)
Io(Error)
Json(Error)
TargetExists(PathBuf)
Unsupported
InvalidBackend(String)
Implementations§
Source§impl MigrateError
impl MigrateError
Sourcepub fn parse_backend(s: &str) -> Result<Backend, MigrateError>
pub fn parse_backend(s: &str) -> Result<Backend, MigrateError>
Parse a backend name from a CLI string. Returns MigrateError::InvalidBackend
if the string is not recognized.
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()
Source§impl From<Error> for MigrateError
impl From<Error> for MigrateError
Source§impl From<Error> for MigrateError
impl From<Error> for MigrateError
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