pub enum FileError {
Io {
operation: &'static str,
path: PathBuf,
source: Box<dyn Error + Send + Sync>,
},
AfterReplace {
path: PathBuf,
source: Box<dyn Error + Send + Sync>,
},
AfterRemove {
path: PathBuf,
source: Box<dyn Error + Send + Sync>,
},
Cleanup {
operation: Box<FileError>,
cleanup: Box<dyn Error + Send + Sync>,
},
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§impl From<FileError> for CopyPathError
impl From<FileError> for CopyPathError
Source§impl From<FileError> for DirectoryCreationError
impl From<FileError> for DirectoryCreationError
Source§impl From<FileError> for ObservationError
impl From<FileError> for ObservationError
Source§impl From<FileError> for SettingsError
impl From<FileError> for SettingsError
Source§impl From<FileError> for StoreLockError
impl From<FileError> for StoreLockError
Source§impl From<FileError> for WriterError
impl From<FileError> for WriterError
Source§impl From<TaskFailed> for FileError
impl From<TaskFailed> for FileError
Source§fn from(failed: TaskFailed) -> Self
fn from(failed: TaskFailed) -> Self
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