Skip to main content

StorageFailure

Enum StorageFailure 

Source
pub enum StorageFailure {
Show 38 variants ProviderUnavailable, AccessNotRegistered { required: OAuthAccess, }, AccessNotGranted { required: OAuthAccess, }, DropboxAppFolderNotShareable, CatchUpRequired, Network, Corrupted, Authentication, PermissionDenied, NotFound, AlreadyExists, Conflict, ContainerNotFound, RegionMismatch, StoreExists, ClockSkew, OwnLocationRequired, QuotaExceeded, RateLimited, InvalidConfiguration, Refused, Protocol, InvalidPath, InvalidRange, NotStoreOwner, InviteeIsStoreOwner, SharingRefused(SharingRefusal), AccountIdUnavailable, InvitationMismatch, SessionMismatch, SessionExpired, InvalidPart, SingleRequestTooLarge { size: u64, limit: u64, }, CopyTooLarge { size: u64, limit: u64, }, Encoding, File, MemberKeysMissing, Bug,
}
Expand description

Failures the app can distinguish and act on (Appendix F.5).

Variants§

§

ProviderUnavailable

The platform or OS version cannot use this built-in provider.

§

AccessNotRegistered

The app did not register the access required by this operation.

Fields

§required: OAuthAccess

Access the app must register before this operation is available.

§

AccessNotGranted

The authorization did not grant the required access.

Fields

§required: OAuthAccess

Access the account must authorize.

§

DropboxAppFolderNotShareable

An App-folder store cannot be shared without relocating it.

§

CatchUpRequired

The installation must complete membership and key-copy catch-up before sending.

§

Network

No route to the provider, a timeout, an interrupted response, or a server failure the provider answered with (§6.7).

§

Corrupted

Two complete reads of one immutable object returned different bytes: a fault on the way to the device changed one of them (§19.1).

§

Authentication

Credentials were refused or must be refreshed.

§

PermissionDenied

The account is signed in but cannot perform this operation.

§

NotFound

The requested object is absent.

§

AlreadyExists

A create-once path is occupied.

§

Conflict

A concurrent storage mutation defeated a conditional request.

§

ContainerNotFound

The bucket, folder or zone is absent.

§

RegionMismatch

The S3 endpoint or signing region is wrong.

§

StoreExists

Setting up a store that never had storage found another installation’s creation slot: another installation of the store claimed this location first (§10.3). Restore or join it instead.

§

ClockSkew

S3 rejected the device clock after one retry with the offset its response stated (§20.7).

§

OwnLocationRequired

Every member reaches the whole location (a Dropbox shared folder, a OneDrive folder, or an S3 bucket), so a store there needs it to itself, and it holds something besides this store (§20.3). At first setup: an object or folder outside the store’s own, or a location marker that doesn’t name it. At a reconnect, restore or join: a marker that is missing, malformed or names another store.

§

QuotaExceeded

The provider has no space left.

§

RateLimited

The provider requests a later retry.

§

InvalidConfiguration

The request’s configuration is invalid.

§

Refused

The provider refused the request for another reason.

§

Protocol

The response or recorded session is malformed.

§

InvalidPath

An object path is outside the store’s layout.

§

InvalidRange

A range is empty, reversed or beyond the object’s end.

§

NotStoreOwner

Coven changes sharing only from the account holding the store. That is coven’s rule, not every provider’s limit (§13.2).

§

InviteeIsStoreOwner

The invited account is the one holding the store (§13.2).

§

SharingRefused(SharingRefusal)

The provider refused to share the store for a reason only a person can fix, the invited address’s or the inviting account’s, so no retry changes the answer (§13.2).

§

AccountIdUnavailable

Dropbox cannot upgrade a pending viewer without the recipient’s account id.

§

InvitationMismatch

The invite belongs to another provider location.

§

SessionMismatch

The session belongs to another provider or location.

§

SessionExpired

The recorded upload expired or a publication conflict invalidated it.

§

InvalidPart

A part disagrees with the session’s offset, size or alignment.

§

SingleRequestTooLarge

A floor pointer replacement exceeds this provider’s single-request limit. The pointer is small, so it never goes up in parts.

Fields

§size: u64

Encrypted body length in bytes.

§limit: u64

The adapter’s single-request limit in bytes.

§

CopyTooLarge

An S3 object published by CopyObject exceeds its single-copy limit, so this profile refuses it (§20.6 says why).

Fields

§size: u64

Encrypted body length in bytes.

§limit: u64

The single-copy limit in bytes.

§

Encoding

Parsing recorded provider data failed.

§

File

Local file access or persisting provider settings or upload progress failed.

§

MemberKeysMissing

This installation has no member keys in custody.

§

Bug

Coven’s work for the request panicked: a bug, which the caller reports (E15). StorageError::Bug carries it.

Implementations§

Source§

impl StorageFailure

Source

pub fn access_ended(self) -> bool

Whether the provider answered that the signed-in account may not use the shared location, or that the location is gone: the access an invite shared is no longer there. A sign-in the provider rejects (Authentication) is not: signing in again can mend it.

Source

pub fn share_refused(self) -> bool

Whether the provider answered, to accepting an invite’s share, that the account may not use the location or that the share or location is gone. A refused sign-in (Authentication) is not: signing in again can mend it.

Source

pub fn with_source( self, source: impl Into<Box<dyn Error + Send + Sync>>, ) -> StorageError

Retain the diagnostic or native cause alongside this classification.

Trait Implementations§

Source§

impl Clone for StorageFailure

Source§

fn clone(&self) -> StorageFailure

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StorageFailure

Source§

impl Debug for StorageFailure

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StorageFailure

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<StorageFailure, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for StorageFailure

Source§

impl From<StorageFailure> for SyncError

Source§

fn from(failure: StorageFailure) -> SyncError

Converts to this type from the input type.
Source§

impl From<StorageFailure> for StorageError

Source§

fn from(failure: StorageFailure) -> StorageError

Converts to this type from the input type.
Source§

impl PartialEq for StorageFailure

Source§

fn eq(&self, other: &StorageFailure) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for StorageFailure

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StorageFailure

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsOut<T> for T
where T: Copy,

§

fn as_out(&mut self) -> Out<'_, T>

Returns an out reference to self.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more