pub struct SyncStatus {
pub state: SyncState,
pub last_synced: Option<SystemTime>,
}Expand description
What a status screen shows (E5, §19.1): the sync state and when sync
last finished, as sync_status() reads it and the handle’s live query
follows it.
Fields§
§state: SyncStateThe sync state.
last_synced: Option<SystemTime>When a pass last reached the end of the sequence, by the store’s clock; kept across every state and never earlier than before.
Implementations§
Source§impl SyncStatus
impl SyncStatus
Sourcepub fn computed(facts: SyncFacts<PendingRecord>) -> Result<SyncStatus, DbError>
pub fn computed(facts: SyncFacts<PendingRecord>) -> Result<SyncStatus, DbError>
The sync state and when sync last finished, from what one committed
snapshot of coven’s rows holds (§19.1): what Database::sync_facts
reads once and Database::subscribe_sync_facts follows.
Sourcepub fn closed(
facts: SyncFacts<PendingRecord>,
location: RecordedLocation<CloudProvider>,
) -> Result<SyncStatus, DbError>
pub fn closed( facts: SyncFacts<PendingRecord>, location: RecordedLocation<CloudProvider>, ) -> Result<SyncStatus, DbError>
A closed store’s sync status (api.md E1, E5): the state opening shows
before sync starts, from the facts its database holds, with what
opening writes over them: location, read from the keychain as
opening reads it; no pass moving, whatever a process that ended
mid-pass left; and sync not running. The facts read with nothing sent
or downloaded, as nothing moves while the store is closed.
Trait Implementations§
Source§impl Clone for SyncStatus
impl Clone for SyncStatus
Source§fn clone(&self) -> SyncStatus
fn clone(&self) -> SyncStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SyncStatus
impl Debug for SyncStatus
Source§impl PartialEq for SyncStatus
impl PartialEq for SyncStatus
impl StructuralPartialEq for SyncStatus
Auto Trait Implementations§
impl Freeze for SyncStatus
impl !RefUnwindSafe for SyncStatus
impl Send for SyncStatus
impl Sync for SyncStatus
impl Unpin for SyncStatus
impl UnsafeUnpin for SyncStatus
impl !UnwindSafe for SyncStatus
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