pub struct BackupSignals {
pub peer_connected: bool,
pub sync_pending: bool,
pub last_sync_before: Option<i64>,
pub last_sync_now: Option<i64>,
pub project_state: Option<String>,
}Expand description
What the backup’s redundancy status says, against its own earlier sample.
Fields§
§peer_connected: boolThe backup sees its peer.
sync_pending: boolA sync is queued and has not run.
last_sync_before: Option<i64>The backup’s own lastSyncTimestamp before the apply; None is
never synced (-1) or not sampled.
last_sync_now: Option<i64>The backup’s lastSyncTimestamp now; None is never synced (-1).
project_state: Option<String>The backup’s projectState, recorded, not a condition (V9).
Implementations§
Source§impl BackupSignals
impl BackupSignals
Sourcepub fn from_status(before: Option<i64>, now: &RedundancyStatusWire) -> Self
pub fn from_status(before: Option<i64>, now: &RedundancyStatusWire) -> Self
Signals from the backup’s status now and its timestamp before. Both
samples go through RedundancyStatusWire::last_sync_epoch_ms’s
rule, so -1 reads as never synced on either side (Pitfall 5). The
timestamps are the same node’s own clock: they are never compared with
the master’s.
Trait Implementations§
Source§impl Clone for BackupSignals
impl Clone for BackupSignals
Source§impl Debug for BackupSignals
impl Debug for BackupSignals
impl Eq for BackupSignals
Source§impl PartialEq for BackupSignals
impl PartialEq for BackupSignals
impl StructuralPartialEq for BackupSignals
Auto Trait Implementations§
impl Freeze for BackupSignals
impl RefUnwindSafe for BackupSignals
impl Send for BackupSignals
impl Sync for BackupSignals
impl Unpin for BackupSignals
impl UnsafeUnpin for BackupSignals
impl UnwindSafe for BackupSignals
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.