pub enum BackupError {
DestinationExists(PathBuf),
DestinationInsideDataDirectory(PathBuf),
RestoreInsideBackup(PathBuf),
InvalidLayout {
path: PathBuf,
reason: &'static str,
},
InvalidManifest {
path: PathBuf,
reason: &'static str,
},
ManifestJson {
path: PathBuf,
source: Error,
},
Snapshot(SnapshotError),
Storage(StorageError),
Io {
action: &'static str,
path: PathBuf,
source: Error,
},
}Expand description
Failure while creating, verifying, or restoring a portable backup.
Variants§
DestinationExists(PathBuf)
The requested destination already exists and is never replaced.
DestinationInsideDataDirectory(PathBuf)
A backup destination inside the live directory would couple lifecycles.
RestoreInsideBackup(PathBuf)
A restore destination inside its source backup is unsafe.
InvalidLayout
The backup directory does not contain exactly the canonical two files.
InvalidManifest
The bounded JSON manifest is malformed or disagrees with its snapshot.
ManifestJson
Backup JSON could not be decoded.
Snapshot(SnapshotError)
Snapshot creation or validation failed.
Storage(StorageError)
Opening or validating restored storage failed before activation.
Io
A filesystem operation failed.
Trait Implementations§
Source§impl Debug for BackupError
impl Debug for BackupError
Source§impl Display for BackupError
impl Display for BackupError
Source§impl Error for BackupError
impl Error for BackupError
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<SnapshotError> for BackupError
impl From<SnapshotError> for BackupError
Source§fn from(source: SnapshotError) -> Self
fn from(source: SnapshotError) -> Self
Converts to this type from the input type.
Source§impl From<StorageError> for BackupError
impl From<StorageError> for BackupError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for BackupError
impl !UnwindSafe for BackupError
impl Freeze for BackupError
impl Send for BackupError
impl Sync for BackupError
impl Unpin for BackupError
impl UnsafeUnpin for BackupError
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