pub struct ContinuityObservation {
pub offers: Vec<Offer>,
pub last_sync: Option<SyncNote>,
}Expand description
What the continuity commands last left in this checkout’s continuity.json: the
handovers other devices published that could be resumed here, as the last sync computed
them, and how that sync went. Read from that one file — never from the store, never from
a remote — so that entering a directory costs no git call and no network.
A checkout that publishes and has never synced is told to sync:
use majordomus_cli::environment::preflight::{derive, ContinuityObservation, Observations, Verdict};
let mut o = Observations::empty("demo", 0);
o.continuity = Some(ContinuityObservation { offers: Vec::new(), last_sync: None });
let c = derive(&o).check("session.continuity").unwrap().clone();
assert_eq!(c.verdict, Verdict::Unknown);
assert!(c.summary.contains("never synced"));Fields§
§offers: Vec<Offer>Resumable handovers from other devices.
last_sync: Option<SyncNote>The last sync.
Trait Implementations§
Source§impl Clone for ContinuityObservation
impl Clone for ContinuityObservation
Source§fn clone(&self) -> ContinuityObservation
fn clone(&self) -> ContinuityObservation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContinuityObservation
impl Debug for ContinuityObservation
impl Eq for ContinuityObservation
Source§impl PartialEq for ContinuityObservation
impl PartialEq for ContinuityObservation
Source§fn eq(&self, other: &ContinuityObservation) -> bool
fn eq(&self, other: &ContinuityObservation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContinuityObservation
Auto Trait Implementations§
impl Freeze for ContinuityObservation
impl RefUnwindSafe for ContinuityObservation
impl Send for ContinuityObservation
impl Sync for ContinuityObservation
impl Unpin for ContinuityObservation
impl UnsafeUnpin for ContinuityObservation
impl UnwindSafe for ContinuityObservation
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.