pub enum SyncError {
Show 29 variants
Pending(Box<PendingRecord>),
Failed {
failure: LocalFailure,
source: Arc<dyn Error + Send + Sync>,
},
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(Removal),
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(Removal)
This device is not in the store, and won’t be again: it or its member was removed, or a joined store read to the end of the sequence with its pair bound nowhere in its history, which means the admission that published it was refused. Syncing stops for good (§13.2, §14.1).
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) -> Self
pub fn cleanup(operation: SyncError, cleanup: SyncError) -> Self
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
use the Display impl or to_string()
Source§impl From<CryptoError> for SyncError
impl From<CryptoError> for SyncError
Source§fn from(error: CryptoError) -> Self
fn from(error: CryptoError) -> Self
Source§impl From<CutOffRefusal> for SyncError
impl From<CutOffRefusal> for SyncError
Source§fn from(refusal: CutOffRefusal) -> Self
fn from(refusal: CutOffRefusal) -> Self
Source§impl From<DamagedObject> for SyncError
impl From<DamagedObject> for SyncError
Source§fn from(source: DamagedObject) -> Self
fn from(source: DamagedObject) -> Self
Source§impl From<MaterialError> for SyncError
impl From<MaterialError> for SyncError
Source§fn from(source: MaterialError) -> Self
fn from(source: MaterialError) -> Self
Source§impl From<ObservationError> for SyncError
impl From<ObservationError> for SyncError
Source§fn from(error: ObservationError) -> Self
fn from(error: ObservationError) -> Self
Source§impl From<OperationRejection> for SyncError
impl From<OperationRejection> for SyncError
Source§fn from(reason: OperationRejection) -> Self
fn from(reason: OperationRejection) -> Self
Source§impl From<StorageError> for SyncError
impl From<StorageError> for SyncError
Source§fn from(error: StorageError) -> Self
fn from(error: StorageError) -> Self
Source§impl From<StorageFailure> for SyncError
impl From<StorageFailure> for SyncError
Source§fn from(failure: StorageFailure) -> Self
fn from(failure: StorageFailure) -> Self
Source§impl From<StoreLockError> for SyncError
impl From<StoreLockError> for SyncError
Source§fn from(error: StoreLockError) -> Self
fn from(error: StoreLockError) -> Self
Source§impl From<SyncError> for SyncFailure
impl From<SyncError> for SyncFailure
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§impl From<TaskFailed> for SyncError
impl From<TaskFailed> for SyncError
Source§fn from(failed: TaskFailed) -> Self
fn from(failed: TaskFailed) -> Self
Source§impl From<WriterError> for SyncError
impl From<WriterError> for SyncError
Source§fn from(error: WriterError) -> Self
fn from(error: WriterError) -> Self
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).
Source§fn with_rollback(self, rollback: SqliteError) -> Self
fn with_rollback(self, rollback: SqliteError) -> Self
Source§fn with_cleanup(write: Self, failures: Vec<DbError>) -> Self
fn with_cleanup(write: Self, failures: Vec<DbError>) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SyncError
impl !UnwindSafe for SyncError
impl Freeze for SyncError
impl Send for SyncError
impl Sync for SyncError
impl Unpin for SyncError
impl UnsafeUnpin 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<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