pub enum FileError {
Io {
operation: &'static str,
path: PathBuf,
source: Box<dyn Error + Sync + Send>,
},
AfterReplace {
path: PathBuf,
source: Box<dyn Error + Sync + Send>,
},
AfterRemove {
path: PathBuf,
source: Box<dyn Error + Sync + Send>,
},
Cleanup {
operation: Box<FileError>,
cleanup: Box<dyn Error + Sync + Send>,
},
DeviceLocked {
path: PathBuf,
},
Shutdown(Shutdown),
Bug(Bug),
}Expand description
A file operation’s cause, including whether replacement already happened.
Variants§
Io
An operation failed without replacing the target.
Fields
AfterReplace
The new bytes are visible, but syncing the directory failed.
Fields
AfterRemove
The file is absent, but syncing its directory failed.
Fields
Cleanup
Removing an unpublished temporary file also failed.
Fields
DeviceLocked
The device is locked, and the file’s protection class keeps it from being made, opened or given its class until the device unlocks (api.md E1). The app waits for the unlock and retries.
Shutdown(Shutdown)
The operation’s runtime is shutting down and dropped it unstarted (E15).
Bug(Bug)
The operation panicked on the blocking pool: a bug, which the caller reports (E15).
Implementations§
Trait Implementations§
Source§impl CarriesBug for FileError
impl CarriesBug for FileError
Source§impl Error for FileError
impl Error for FileError
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<FileError> for BootstrapDirectoryError
impl From<FileError> for BootstrapDirectoryError
Source§fn from(error: FileError) -> BootstrapDirectoryError
fn from(error: FileError) -> BootstrapDirectoryError
Converts to this type from the input type.
Source§impl From<FileError> for BootstrapError
impl From<FileError> for BootstrapError
Source§impl From<FileError> for CopyPathError
impl From<FileError> for CopyPathError
Source§fn from(error: FileError) -> CopyPathError
fn from(error: FileError) -> CopyPathError
Converts to this type from the input type.
Source§impl From<FileError> for CovenError
impl From<FileError> for CovenError
Source§impl From<FileError> for DeviceOnlyError
impl From<FileError> for DeviceOnlyError
Source§fn from(error: FileError) -> DeviceOnlyError
fn from(error: FileError) -> DeviceOnlyError
Converts to this type from the input type.
Source§impl From<FileError> for DirectoryCreationError
impl From<FileError> for DirectoryCreationError
Source§fn from(source: FileError) -> DirectoryCreationError
fn from(source: FileError) -> DirectoryCreationError
Converts to this type from the input type.
Source§impl From<FileError> for FileReadError
impl From<FileError> for FileReadError
Source§fn from(error: FileError) -> FileReadError
fn from(error: FileError) -> FileReadError
Converts to this type from the input type.
Source§impl From<FileError> for SettingsError
impl From<FileError> for SettingsError
Source§fn from(error: FileError) -> SettingsError
fn from(error: FileError) -> SettingsError
Converts to this type from the input type.
Source§impl From<FileError> for StorageError
impl From<FileError> for StorageError
Source§fn from(error: FileError) -> StorageError
fn from(error: FileError) -> StorageError
Converts to this type from the input type.
Source§impl From<FileError> for StoreDeletionError
impl From<FileError> for StoreDeletionError
Source§impl From<FileError> for StoreListError
impl From<FileError> for StoreListError
Source§impl From<FileError> for StoreLockError
impl From<FileError> for StoreLockError
Source§fn from(error: FileError) -> StoreLockError
fn from(error: FileError) -> StoreLockError
Converts to this type from the input type.
Source§impl From<TaskFailed> for FileError
impl From<TaskFailed> for FileError
Source§fn from(failed: TaskFailed) -> FileError
fn from(failed: TaskFailed) -> FileError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FileError
impl !RefUnwindSafe for FileError
impl Send for FileError
impl Sync for FileError
impl Unpin for FileError
impl UnsafeUnpin for FileError
impl !UnwindSafe for FileError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.