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()