pub enum StorageError {
Failure(StorageFailure),
Caused {
failure: StorageFailure,
source: Box<dyn Error + Sync + Send>,
},
Provider {
provider: CloudProvider,
failure: StorageFailure,
source: Box<dyn Error + Sync + Send>,
},
Cleanup {
operation: Box<StorageError>,
cleanup: Box<StorageError>,
},
Bug(Bug),
}Expand description
A storage error preserves its cause without converting it into text.
Variants§
Failure(StorageFailure)
A classified failure with no underlying native error.
Caused
A classified local failure with its diagnostic or native cause.
Fields
failure: StorageFailureThe failure the app can act on.
Provider
A provider failure, classified for the app, with its original cause.
Fields
provider: CloudProviderProvider that failed.
failure: StorageFailureActionable classification.
Cleanup
Cleanup failed too; neither cause is hidden.
Fields
operation: Box<StorageError>The original failure.
cleanup: Box<StorageError>Failure removing temporary data or recording the failed upload state.
Bug(Bug)
Coven’s work for the request panicked: a bug, which the caller
reports (E15). Its failure is StorageFailure::Bug.
Implementations§
Source§impl StorageError
impl StorageError
Sourcepub fn failure(&self) -> StorageFailure
pub fn failure(&self) -> StorageFailure
What the app can do about this failure.
Sourcepub fn own_failure(&self) -> Option<StorageFailure>
pub fn own_failure(&self) -> Option<StorageFailure>
The failure when the request alone failed: none when its cleanup failed too, which leaves state behind that a caller handling the failure itself, such as an occupied path or a throttled request, doesn’t know of.
Sourcepub fn answered(&self) -> bool
pub fn answered(&self) -> bool
Whether the provider answered the request behind this failure, even
with an error (E5). Network alone cannot say: a server’s error
response is an answer; a refused connection or a timeout is not.
Sourcepub fn refused(&self) -> bool
pub fn refused(&self) -> bool
Whether the provider answered this request with a refusal, so it stored nothing. A timeout, or a lost, malformed or server-failure reply, leaves the outcome unknown. The clients resend a request only after a refusal (a rejected token, a skewed clock), so no earlier attempt of it stored anything either.
Trait Implementations§
Source§impl CarriesBug for StorageError
impl CarriesBug for StorageError
Source§impl Debug for StorageError
impl Debug for StorageError
Source§impl Display for StorageError
impl Display for StorageError
Source§impl Error for StorageError
impl Error for StorageError
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
Source§impl From<Bug> for StorageError
impl From<Bug> for StorageError
Source§fn from(source: Bug) -> StorageError
fn from(source: Bug) -> StorageError
Source§impl From<Error> for StorageError
A code’s storage part that the format’s primitives refuse: truncated,
trailing bytes, an unknown tag or a length past its bound (format.md D13).
impl From<Error> for StorageError
A code’s storage part that the format’s primitives refuse: truncated, trailing bytes, an unknown tag or a length past its bound (format.md D13).
Source§fn from(error: Error) -> StorageError
fn from(error: Error) -> StorageError
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<PathError> for StorageError
impl From<PathError> for StorageError
Source§fn from(error: PathError) -> StorageError
fn from(error: PathError) -> StorageError
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<StorageError> for OAuthError
impl From<StorageError> for OAuthError
Source§fn from(source: StorageError) -> OAuthError
fn from(source: StorageError) -> OAuthError
Source§impl From<StorageError> for StorageCheckError
impl From<StorageError> for StorageCheckError
Source§fn from(error: StorageError) -> StorageCheckError
fn from(error: StorageError) -> StorageCheckError
Source§impl From<StorageError> for StorageSetupError
impl From<StorageError> for StorageSetupError
Source§fn from(error: StorageError) -> Self
fn from(error: StorageError) -> Self
Source§impl From<StorageError> for StoreKeyUnlockError
impl From<StorageError> for StoreKeyUnlockError
Source§fn from(error: StorageError) -> Self
fn from(error: StorageError) -> Self
Source§impl From<StorageError> for SyncError
impl From<StorageError> for SyncError
Source§fn from(error: StorageError) -> SyncError
fn from(error: StorageError) -> SyncError
Source§impl From<StorageFailure> for StorageError
impl From<StorageFailure> for StorageError
Source§fn from(failure: StorageFailure) -> StorageError
fn from(failure: StorageFailure) -> StorageError
Auto Trait Implementations§
impl Freeze for StorageError
impl !RefUnwindSafe for StorageError
impl Send for StorageError
impl Sync for StorageError
impl Unpin for StorageError
impl UnsafeUnpin for StorageError
impl !UnwindSafe for StorageError
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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