pub struct Hello {
pub machine_id: String,
pub wall_micros: i64,
pub synced: bool,
pub cursor: Option<u64>,
pub held_origin_seq: Option<i64>,
pub keys: Option<HandshakeKeys>,
pub peer_in: Option<u64>,
pub log_floor: u64,
pub head: u64,
pub applied: Option<u64>,
pub merging: Option<Merging>,
}Expand description
What each side of a sync tells the other about its clock and how much of the other’s log it holds, so neither reissues a sequence number or an origin key the other has already seen.
Fields§
§machine_id: String§wall_micros: i64Microseconds since the Unix epoch.
synced: boolThe sender’s clock is NTP-synchronised: the signal itself, not merely a clock gate that has opened.
cursor: Option<u64>The sender’s cursor on the receiver’s log.
held_origin_seq: Option<i64>The highest origin_seq of the receiver’s own records the sender holds.
keys: Option<HandshakeKeys>None from a sender on sync protocol 3 or older.
peer_in: Option<u64>The highest seq of the receiver’s log that the receiver’s pushes into the sender have applied.
log_floor: u64The sender’s log holds no rows at or below this seq.
head: u64The highest seq the sender has minted.
applied: Option<u64>How far into the receiver’s log the sender has applied without a
gap, below cursor while a record from it still fails.
merging: Option<Merging>A snapshot merge the sender has not finished; a pusher neither streams another nor advances while one runs.
Implementations§
Source§impl Hello
impl Hello
Sourcepub fn applied_of_receiver(&self) -> Option<u64>
pub fn applied_of_receiver(&self) -> Option<u64>
How far into the receiver’s log the sender has applied, by its own pulls or by the receiver’s pushes.
Sourcepub fn acked_by_receiver(&self) -> Option<u64>
pub fn acked_by_receiver(&self) -> Option<u64>
applied_of_receiver without the gaps: a record the sender still
fails to apply holds this below its cursor, so the floor keeps it.
Sourcepub fn keys(&self) -> Result<&HandshakeKeys, VersionError>
pub fn keys(&self) -> Result<&HandshakeKeys, VersionError>
Refuses a hello from a binary that predates sync identities, naming the upgrade rather than pairing as the fix.
pub fn from_arg(arg: &str) -> Result<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hello
impl<'de> Deserialize<'de> for Hello
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Hello
impl StructuralPartialEq for Hello
Auto Trait Implementations§
impl Forget for Hello
impl Freeze for Hello
impl Move for Hello
impl RefUnwindSafe for Hello
impl Send for Hello
impl Sync for Hello
impl Unpin for Hello
impl UnsafeUnpin for Hello
impl UnwindSafe for Hello
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> Fruit for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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