pub enum FileError {
Io {
operation: &'static str,
path: PathBuf,
source: Box<dyn Error + Send + Sync>,
},
HeldOpen {
operation: &'static str,
path: PathBuf,
held: Vec<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
HeldOpen
Moving or deleting a directory failed on Windows, which refuses to move or delete a directory while a file in it is open, and these files in it refused an exclusive open.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
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
Source§impl From<FileError> for DirectoryCreationError
impl From<FileError> for DirectoryCreationError
Source§fn from(source: FileError) -> DirectoryCreationError
fn from(source: FileError) -> DirectoryCreationError
Source§impl From<FileError> for CopyPathError
impl From<FileError> for CopyPathError
Source§fn from(error: FileError) -> CopyPathError
fn from(error: FileError) -> CopyPathError
Source§impl From<FileError> for StoreLockError
impl From<FileError> for StoreLockError
Source§fn from(error: FileError) -> StoreLockError
fn from(error: FileError) -> StoreLockError
Source§impl From<FileError> for SettingsError
impl From<FileError> for SettingsError
Source§fn from(error: FileError) -> SettingsError
fn from(error: FileError) -> SettingsError
Source§impl From<FileError> for DeviceOnlyError
impl From<FileError> for DeviceOnlyError
Source§fn from(error: FileError) -> DeviceOnlyError
fn from(error: FileError) -> DeviceOnlyError
Source§impl From<FileError> for FileReadError
impl From<FileError> for FileReadError
Source§fn from(error: FileError) -> FileReadError
fn from(error: FileError) -> FileReadError
Source§impl From<FileError> for StorageError
impl From<FileError> for StorageError
Source§fn from(error: FileError) -> StorageError
fn from(error: FileError) -> StorageError
Source§impl From<FileError> for BootstrapError
impl From<FileError> for BootstrapError
Source§impl From<FileError> for StoreListError
impl From<FileError> for StoreListError
Source§impl From<FileError> for CovenError
impl From<FileError> for CovenError
Source§impl From<FileError> for StoreDeletionError
impl From<FileError> for StoreDeletionError
Source§impl From<TaskFailed> for FileError
impl From<TaskFailed> for FileError
Source§fn from(failed: TaskFailed) -> FileError
fn from(failed: TaskFailed) -> FileError
Auto Trait Implementations§
impl !RefUnwindSafe for FileError
impl !UnwindSafe for FileError
impl Freeze for FileError
impl Send for FileError
impl Sync for FileError
impl Unpin for FileError
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> HostError for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 more