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: LocalFailureDurable local category.
Cleanup
A later step, such as a rollback or closing another owner, failed too; neither failure is hidden.
Fields
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.
A required key’s sealed copy has not arrived.
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.
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).
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
impl SyncError
Sourcepub fn cleanup(operation: SyncError, cleanup: SyncError) -> SyncError
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.
Sourcepub fn pending_reason(&self, provider: CloudProvider) -> PendingReason
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.
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
impl CarriesBug for SyncError
Source§impl Error for SyncError
impl Error for SyncError
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<CryptoError> for SyncError
impl From<CryptoError> for SyncError
Source§fn from(error: CryptoError) -> SyncError
fn from(error: CryptoError) -> SyncError
Source§impl From<CutOffRefusal> for SyncError
impl From<CutOffRefusal> for SyncError
Source§fn from(refusal: CutOffRefusal) -> SyncError
fn from(refusal: CutOffRefusal) -> SyncError
Source§impl From<DamagedObject> for SyncError
impl From<DamagedObject> for SyncError
Source§fn from(source: DamagedObject) -> SyncError
fn from(source: DamagedObject) -> SyncError
Source§impl From<MaterialError> for SyncError
impl From<MaterialError> for SyncError
Source§fn from(source: MaterialError) -> SyncError
fn from(source: MaterialError) -> SyncError
Source§impl From<ObservationError> for SyncError
impl From<ObservationError> for SyncError
Source§fn from(error: ObservationError) -> SyncError
fn from(error: ObservationError) -> SyncError
Source§impl From<OperationRejection> for SyncError
impl From<OperationRejection> for SyncError
Source§fn from(reason: OperationRejection) -> SyncError
fn from(reason: OperationRejection) -> SyncError
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 SyncError
impl From<StorageFailure> for SyncError
Source§fn from(failure: StorageFailure) -> SyncError
fn from(failure: StorageFailure) -> SyncError
Source§impl From<StoreLockError> for SyncError
impl From<StoreLockError> for SyncError
Source§fn from(error: StoreLockError) -> SyncError
fn from(error: StoreLockError) -> SyncError
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.
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§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).
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§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<SyncError> for ReadOnlyOpenError
impl From<SyncError> for ReadOnlyOpenError
Source§impl From<SyncError> for StoreCreationError
impl From<SyncError> for StoreCreationError
Source§impl From<SyncError> for StoreDeletionError
impl From<SyncError> for StoreDeletionError
Source§impl From<SyncError> for SyncFailure
impl From<SyncError> for SyncFailure
Source§fn from(error: SyncError) -> SyncFailure
fn from(error: SyncError) -> SyncFailure
Source§impl From<TaskFailed> for SyncError
impl From<TaskFailed> for SyncError
Source§fn from(failed: TaskFailed) -> SyncError
fn from(failed: TaskFailed) -> SyncError
Source§impl From<WriterError> for SyncError
impl From<WriterError> for SyncError
Source§fn from(error: WriterError) -> SyncError
fn from(error: WriterError) -> SyncError
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).
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).
Auto Trait Implementations§
impl Freeze for SyncError
impl !RefUnwindSafe for SyncError
impl Send for SyncError
impl Sync for SyncError
impl Unpin for SyncError
impl UnsafeUnpin for SyncError
impl !UnwindSafe for SyncError
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