Skip to main content

SyncError

Enum SyncError 

Source
pub enum SyncError {
Show 31 variants Pending(Box<PendingRecord>), Failed { failure: LocalFailure, source: Arc<dyn Error + Sync + Send>, }, Cleanup { operation: Box<SyncError>, cleanup: Box<SyncError>, }, NoStorage, StoreOwner, InvitationChanged, NotPending(OperationId), ReloadPending(OperationId), SnapshotPending(OperationId), OperationData(Error), SequenceExhausted, Storage(StorageError), Database(DbError), SecureStorage(KeyError), Crypto(CryptoError), Format(Error), Key(MaterialError), KeyUnavailable { audience: Audience, key: KeyId, }, Rejected(OperationRejection), CutOffRefused(CutOffRefusal), Damaged(DamagedObject), Removed, NotAdmitted, ReplacementPending { access_key_id: String, }, DeviceIdInUse(DeviceIdEvidence), MemberKeysReplaced { member: MemberId, }, UpdateRequired(RequiredUpdate), Code(CodeError), Shutdown(Shutdown), Bug(Bug), WorkerFailed(Bug),
}
Expand description

A synchronization request failed; its durable queue, if any, remains retryable.

Variants§

§

Pending(Box<PendingRecord>)

This call requires work that cannot yet advance.

§

Failed

A local invariant or resource failed, classified without erasing its native cause. One failure delivered to several callers shares one cause.

Fields

§failure: LocalFailure

Durable local category.

§source: Arc<dyn Error + Sync + Send>

Original failure retained by the initiating call.

§

Cleanup

A later step, such as a rollback or closing another owner, failed too; neither failure is hidden.

Fields

§operation: Box<SyncError>

The original failure.

§cleanup: Box<SyncError>

The later failure, such as restoring the original state.

§

NoStorage

This call requires connected storage; durable work remains queued.

§

StoreOwner

The member whose account holds the store can’t be removed, and their access can’t move to another account (§10.1): OneDrive and CloudKit can’t hand a store to another account, and coven doesn’t use Dropbox’s ownership transfer (bae-fm/coven#237).

§

InvitationChanged

The request or invitation is absent, expired, or no longer matches.

§

NotPending(OperationId)

The requested journal row is not failed app work available for retry or discard.

§

ReloadPending(OperationId)

Administrative and snapshot publication wait for the retained reload (§11).

§

SnapshotPending(OperationId)

Deleting stored files waits for this unfinished snapshot, whose journal still owns references no row holds (§17.10).

§

OperationData(Error)

Decoding persisted operation data failed; its cause remains available.

§

SequenceExhausted

The sequence has no next slot: slot numbers are u64s, and the slot it would follow is the last one.

§

Storage(StorageError)

Storage refused or failed a request.

§

Database(DbError)

The local database failed.

§

SecureStorage(KeyError)

Unlocking or keeping keys failed.

§

Crypto(CryptoError)

Making encrypted or signed bytes failed.

§

Format(Error)

The proposed entry violates its byte format.

§

Key(MaterialError)

A required key has not arrived or the local key material conflicts.

§

KeyUnavailable

A required key’s sealed copy has not arrived.

Fields

§audience: Audience

The audience the key belongs to.

§key: KeyId

The missing key.

§

Rejected(OperationRejection)

The proposed change is already invalid in the author’s applied view.

§

CutOffRefused(CutOffRefusal)

confirm_device_cut_off changed nothing, for this reason.

§

Damaged(DamagedObject)

A required object failed authentication or parsing.

§

Removed

This device or its member was removed; syncing stops for good (§14.1).

§

NotAdmitted

A joined store read to the end of the sequence with its pair bound nowhere in its history: the admission that published it was refused, and its device never became a member. Syncing stops for good (§13.2, §14.1).

§

ReplacementPending

A replacement of this member’s S3 key by another key is still under way: its id isn’t recorded yet, or custody doesn’t connect with it yet (§14.3). Retrying with that key finishes it; once it ends, another key can replace it.

Fields

§access_key_id: String

The key the replacement under way records.

§

DeviceIdInUse(DeviceIdEvidence)

Another copy uses this device’s id, as this evidence shows. This copy sends nothing more; nothing is recorded, and reset_device is the app’s option (§19.3).

§

MemberKeysReplaced

Held signing credentials are no longer current for this stable id, or an object was fixed under credentials that are no longer current. Sending stops; it never re-signs an old object with newer keys (§14.1).

Fields

§member: MemberId

The stable member whose keys were replaced.

§

UpdateRequired(RequiredUpdate)

This call needs a newer app schema or coven format (§18).

§

Code(CodeError)

A code can’t be used for this call, as one naming another store.

§

Shutdown(Shutdown)

The call’s runtime is shutting down and dropped its work (E15). A database call the blocking pool dropped unstarted changed nothing; a call that runs as its own task, as closing and replacing credentials do, may have stopped partway.

§

Bug(Bug)

The call’s work panicked: a bug in coven, which the caller reports (E15). Its category is LocalFailure::Bug.

§

WorkerFailed(Bug)

The worker this call needs ended on a panic: the sync loop, a connection attempt or the upload worker. The store’s bug sink heard the bug as it happened, so the app shows this and doesn’t report it again (E15). Its category is LocalFailure::Bug.

Implementations§

Source§

impl SyncError

Source

pub fn cleanup(operation: SyncError, cleanup: SyncError) -> SyncError

operation failed, and a later step (a rollback, closing another owner) failed too; neither failure is hidden.

Source

pub fn pending_reason(&self, provider: CloudProvider) -> PendingReason

The durable reason for a failed request, without losing its typed cause here. Every variant is matched by name, so a new one is classified here.

Source

pub fn into_shared(self) -> (LocalFailure, Arc<dyn Error + Sync + Send>)

The local category and one shared cause, for a status and a waiting caller failed by the same error.

Trait Implementations§

Source§

impl CarriesBug for SyncError

Source§

fn bug(&self) -> Option<&Bug>

The bug this error carries, itself or through the failure it keeps.
Source§

impl Debug for SyncError

Source§

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

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

impl Display for SyncError

Source§

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

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

impl Error for SyncError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Bug> for SyncError

Source§

fn from(source: Bug) -> SyncError

Converts to this type from the input type.
Source§

impl From<CodeError> for SyncError

Source§

fn from(source: CodeError) -> SyncError

Converts to this type from the input type.
Source§

impl From<CryptoError> for SyncError

Source§

fn from(error: CryptoError) -> SyncError

Converts to this type from the input type.
Source§

impl From<CutOffRefusal> for SyncError

Source§

fn from(refusal: CutOffRefusal) -> SyncError

Converts to this type from the input type.
Source§

impl From<DamagedObject> for SyncError

Source§

fn from(source: DamagedObject) -> SyncError

Converts to this type from the input type.
Source§

impl From<DbError> for SyncError

Source§

fn from(error: DbError) -> SyncError

Converts to this type from the input type.
Source§

impl From<Error> for SyncError

Source§

fn from(source: Error) -> SyncError

Converts to this type from the input type.
Source§

impl From<Error> for SyncError

Source§

fn from(error: Error) -> SyncError

Converts to this type from the input type.
Source§

impl From<FileError> for SyncError

Source§

fn from(error: FileError) -> SyncError

Converts to this type from the input type.
Source§

impl From<KeyError> for SyncError

Source§

fn from(error: KeyError) -> SyncError

Converts to this type from the input type.
Source§

impl From<MaterialError> for SyncError

Source§

fn from(source: MaterialError) -> SyncError

Converts to this type from the input type.
Source§

impl From<ObservationError> for SyncError

Source§

fn from(error: ObservationError) -> SyncError

Converts to this type from the input type.
Source§

impl From<OperationRejection> for SyncError

Source§

fn from(reason: OperationRejection) -> SyncError

Converts to this type from the input type.
Source§

impl From<Shutdown> for SyncError

Source§

fn from(source: Shutdown) -> SyncError

Converts to this type from the input type.
Source§

impl From<Error> for SyncError

Source§

fn from(error: Error) -> SyncError

Converts to this type from the input type.
Source§

impl From<StorageError> for SyncError

Source§

fn from(error: StorageError) -> SyncError

Converts to this type from the input type.
Source§

impl From<StorageFailure> for SyncError

Source§

fn from(failure: StorageFailure) -> SyncError

Converts to this type from the input type.
Source§

impl From<StoreLockError> for SyncError

Source§

fn from(error: StoreLockError) -> SyncError

Converts to this type from the input type.
Source§

impl From<SyncError> for BootstrapError

A code sync refuses is refused as the call’s own code: a join’s, as a restore’s.

Source§

fn from(error: SyncError) -> Self

Converts to this type from the input type.
Source§

impl From<SyncError> for CovenError

A sync step’s failure inside an app’s write or while the store opens: a database failure as itself, a bug or shutdown as the call’s own, and any other as the step’s own error (§4, E15).

Source§

fn from(error: SyncError) -> Self

Converts to this type from the input type.
Source§

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

Converts to this type from the input type.
Source§

impl From<SyncError> for ReadOnlyOpenError

Source§

fn from(error: SyncError) -> Self

Converts to this type from the input type.
Source§

impl From<SyncError> for StoreCreationError

Source§

fn from(error: SyncError) -> Self

Converts to this type from the input type.
Source§

impl From<SyncError> for StoreDeletionError

Source§

fn from(error: SyncError) -> Self

Converts to this type from the input type.
Source§

impl From<SyncError> for SyncFailure

Source§

fn from(error: SyncError) -> SyncFailure

Converts to this type from the input type.
Source§

impl From<TaskFailed> for SyncError

Source§

fn from(failed: TaskFailed) -> SyncError

Converts to this type from the input type.
Source§

impl From<WriterError> for SyncError

Source§

fn from(error: WriterError) -> SyncError

Converts to this type from the input type.
Source§

impl WriteFailure for SyncError

Sync’s own writes keep their error: a database failure as itself, and any other with a failed rollback or byte removal as a later step that failed too (§4, Appendix C.3).

Source§

fn with_rollback(self, rollback: Error) -> SyncError

Retain a failed rollback alongside the original failure.
Source§

fn with_cleanup(write: SyncError, failures: Vec<DbError>) -> SyncError

Retain the failed write’s error and every failed byte-removal operation.

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
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
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: 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: 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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
§

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,

§

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

§

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