pub enum SyncState {
Show 15 variants
NotSynced,
Syncing,
WaitingToSync(SyncWait),
Synced,
Offline(SyncCause),
OfflineWithUnsentChanges(SyncCause),
SignedOut {
provider: CloudProvider,
cause: Option<SyncCause>,
},
NoAccess(SyncCause),
StorageFull(SyncCause),
FolderMissing(SyncCause),
ClockWrong(SyncCause),
UpdateNeeded(SyncCause),
Removed(SyncCause),
NeedsReset(SyncCause),
Failed(SyncCause),
}Expand description
The sync state (§19.1). With several candidates, the first of Removed,
NeedsReset, UpdateNeeded, SignedOut, NoAccess, FolderMissing,
ClockWrong, StorageFull, OfflineWithUnsentChanges, Offline,
Failed, Syncing, WaitingToSync, Synced shows; NotSynced comes
before them all.
Variants§
NotSynced
No storage location is recorded on this device.
Syncing
A running pass has read or claimed a slot, or a file is being sent or downloaded.
WaitingToSync(SyncWait)
Nothing moves, and the last pass was held back, at a slot that can’t apply yet or by a provider’s cooldown, or a file waits in the upload queue, or a write in the send queue: what the pass waits for, else what the first such file waits for, else what the write waits for.
Synced
The last pass reached the end of the sequence, every file this device uploads is stored, the send queue is empty, and nothing below holds: nothing waits.
Offline(SyncCause)
The last pass got no provider response.
OfflineWithUnsentChanges(SyncCause)
Offline, and the send queue holds a write or the upload queue a file.
SignedOut
A location is recorded, but this device holds no credentials for it (no cause), or storage refused them.
Fields
provider: CloudProviderThe recorded location’s provider.
NoAccess(SyncCause)
Signed in, but the account isn’t allowed.
StorageFull(SyncCause)
The provider’s quota is used up.
FolderMissing(SyncCause)
The storage folder or bucket is gone.
ClockWrong(SyncCause)
The device’s clock is too far from the provider’s.
UpdateNeeded(SyncCause)
A newer app or coven is needed.
Removed(SyncCause)
This device or its member was removed, or a joined store’s admission
was refused (NotAdmitted, §13.2).
NeedsReset(SyncCause)
Another copy uses this device’s id, or its member keys were replaced.
Failed(SyncCause)
Any other failure, or a file that can’t be uploaded or read, whose pending record is the cause.
Trait Implementations§
impl StructuralPartialEq for SyncState
Auto Trait Implementations§
impl Freeze for SyncState
impl !RefUnwindSafe for SyncState
impl Send for SyncState
impl Sync for SyncState
impl Unpin for SyncState
impl UnsafeUnpin for SyncState
impl !UnwindSafe for SyncState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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