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 coven_sync_state shows them and sync_status() reads
them.
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 read(sql: SqlReadContext<'_>) -> Result<SyncStatus, DbError>
pub fn read(sql: SqlReadContext<'_>) -> Result<SyncStatus, DbError>
The sync state and when sync last finished, as coven_sync_state
shows them in the caller’s read.
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,
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 (const: unstable) · 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 !RefUnwindSafe for SyncStatus
impl !UnwindSafe for SyncStatus
impl Freeze for SyncStatus
impl Send for SyncStatus
impl Sync for SyncStatus
impl Unpin for SyncStatus
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§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