pub enum LocalFileError {
UserFileMissing {
id: String,
path: PathBuf,
},
UserFileChanged {
id: String,
path: PathBuf,
},
Integrity {
id: String,
},
RangeOutOfBounds {
id: String,
offset: u64,
end: u64,
size: u64,
},
Database(DbError),
Disk(FileError),
Lock(StoreLockError),
Bug(Bug),
}Expand description
A local file operation’s typed failure.
Variants§
UserFileMissing
The recorded original is absent.
UserFileChanged
The recorded original’s facts changed.
Integrity
Bytes did not match the file’s content or an owned copy disappeared.
RangeOutOfBounds
The requested range exceeds the file’s size.
Fields
Database(DbError)
Looking up the file failed.
Disk(FileError)
The filesystem failed.
Lock(StoreLockError)
The store cannot be retained while opening its file.
Bug(Bug)
Opening or reading the file panicked: a bug, which the caller reports (E15).
Trait Implementations§
Source§impl CarriesBug for LocalFileError
impl CarriesBug for LocalFileError
Source§impl Debug for LocalFileError
impl Debug for LocalFileError
Source§impl Display for LocalFileError
impl Display for LocalFileError
Source§impl Error for LocalFileError
impl Error for LocalFileError
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<Bug> for LocalFileError
impl From<Bug> for LocalFileError
Source§impl From<DbError> for LocalFileError
impl From<DbError> for LocalFileError
Source§impl From<FileError> for LocalFileError
impl From<FileError> for LocalFileError
Source§impl From<StoreLockError> for LocalFileError
impl From<StoreLockError> for LocalFileError
Source§fn from(error: StoreLockError) -> Self
fn from(error: StoreLockError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LocalFileError
impl !RefUnwindSafe for LocalFileError
impl Send for LocalFileError
impl Sync for LocalFileError
impl Unpin for LocalFileError
impl UnsafeUnpin for LocalFileError
impl !UnwindSafe for LocalFileError
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