pub struct Mismatch {
pub theirs: String,
pub ours: String,
pub ms: i64,
}Expand description
A member’s protocol beside this node’s, both as their ALPN (borg/mesh/<n>), and when it was seen.
Fields§
§theirs: String§ours: String§ms: i64Implementations§
Source§impl Mismatch
impl Mismatch
Sourcepub fn line(&self, key: &str) -> String
pub fn line(&self, key: &str) -> String
What the mesh log and borg doctor say about member key: who has to upgrade.
Sourcepub fn told(&self, me: &str) -> String
pub fn told(&self, me: &str) -> String
The same, as the member on the other end reads it about this node (me): the close reason sent to it.
Protocol: a node that does not speak the protocol a session agreed on closes it with this reason
(borg-mesh sync.rs mismatch, code 2), and the node on the other end reads it back (from_told),
so its words up to the colon never change.
Sourcepub fn from_told(reason: &str, ms: i64) -> Option<Mismatch>
pub fn from_told(reason: &str, ms: i64) -> Option<Mismatch>
The mismatch a close reason (told) states, from this node’s side, seen at ms: how a node learns
that a newer member no longer speaks its protocol, since that member agrees on this node’s
protocol and then refuses it. None unless both protocols read as borg/mesh/<n>.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mismatch
impl<'de> Deserialize<'de> for Mismatch
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 Mismatch
impl StructuralPartialEq for Mismatch
Auto Trait Implementations§
impl Freeze for Mismatch
impl RefUnwindSafe for Mismatch
impl Send for Mismatch
impl Sync for Mismatch
impl Unpin for Mismatch
impl UnsafeUnpin for Mismatch
impl UnwindSafe for Mismatch
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<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
key and return true if they are equal.