pub enum FileReadError {
Show 14 variants
UpdateRequired(RequiredUpdate),
NoStorage,
Missing {
id: String,
device: DeviceId,
},
DeviceOnly {
file: FileId,
device: DeviceId,
},
UserFileMissing {
id: String,
path: PathBuf,
},
UserFileChanged {
id: String,
path: PathBuf,
},
Integrity {
id: String,
cause: Option<Arc<CryptoError>>,
},
RangeOutOfBounds {
id: String,
offset: u64,
end: u64,
size: u64,
},
Database(DbError),
Disk(FileError),
Lock(StoreLockError),
Storage(StorageError),
Sync(Box<SyncError>),
Bug(Bug),
}Expand description
Reading a file failed with a cause the app can distinguish (E8).
Variants§
UpdateRequired(RequiredUpdate)
This file uses a newer coven format (Appendix C.2).
NoStorage
No storage capability is connected.
Missing
Storage confirms nothing at the path a stored file’s record names: the provider lost it (§17.6). Nothing brings it back on its own.
DeviceOnly
The file is only on one device, and nothing waits for it (§17.2). A read, a device-only call’s download among them, returns it only for a file on another device: this device keeps the bytes of every file whose record keeps it here (§17.7, §17.11). A pin returns it for a file on any one device, this one included while it uploads, since only stored bytes are kept (§17.8).
UserFileMissing
A recorded original is absent.
UserFileChanged
An original changed after it was staged.
Integrity
Authentication, a chunk hash or the whole-file hash failed.
Fields
cause: Option<Arc<CryptoError>>The authentication failure, when a chunk failed to open. A size, layout or hash disagreement has no cause beyond the comparison.
RangeOutOfBounds
The requested range is outside the file.
Fields
Database(DbError)
A database failure, retaining its cause.
Disk(FileError)
A disk failure, retaining its cause.
Lock(StoreLockError)
The store cannot be retained while opening its file.
Storage(StorageError)
A provider failure, retaining its classification and native cause.
Sync(Box<SyncError>)
Recording what a read or an upload settled failed in sync’s own work, as a retry wait the clock can’t hold, keeping its cause; a failed read whose failure couldn’t be recorded keeps both (§17.9).
Bug(Bug)
The read’s work panicked: a bug, which the caller reports (E15).
Trait Implementations§
Source§impl CarriesBug for FileReadError
impl CarriesBug for FileReadError
Source§impl Debug for FileReadError
impl Debug for FileReadError
Source§impl Display for FileReadError
impl Display for FileReadError
Source§impl Error for FileReadError
impl Error for FileReadError
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<Bug> for FileReadError
impl From<Bug> for FileReadError
Source§fn from(source: Bug) -> FileReadError
fn from(source: Bug) -> FileReadError
Source§impl From<DbError> for FileReadError
impl From<DbError> for FileReadError
Source§fn from(error: DbError) -> FileReadError
fn from(error: DbError) -> FileReadError
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<LocalFileError> for FileReadError
impl From<LocalFileError> for FileReadError
Source§fn from(error: LocalFileError) -> FileReadError
fn from(error: LocalFileError) -> FileReadError
Source§impl From<StorageError> for FileReadError
impl From<StorageError> for FileReadError
Source§fn from(error: StorageError) -> FileReadError
fn from(error: StorageError) -> FileReadError
Source§impl From<StoreLockError> for FileReadError
impl From<StoreLockError> for FileReadError
Source§fn from(error: StoreLockError) -> FileReadError
fn from(error: StoreLockError) -> FileReadError
Source§impl From<SyncError> for FileReadError
A database or provider failure as itself; any other of sync’s own
failures kept whole.
impl From<SyncError> for FileReadError
A database or provider failure as itself; any other of sync’s own failures kept whole.
Source§fn from(error: SyncError) -> FileReadError
fn from(error: SyncError) -> FileReadError
Source§impl From<WriterError> for FileReadError
impl From<WriterError> for FileReadError
Source§fn from(error: WriterError) -> FileReadError
fn from(error: WriterError) -> FileReadError
Auto Trait Implementations§
impl !RefUnwindSafe for FileReadError
impl !UnwindSafe for FileReadError
impl Freeze for FileReadError
impl Send for FileReadError
impl Sync for FileReadError
impl Unpin for FileReadError
impl UnsafeUnpin for FileReadError
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