pub struct Disconnect {
pub peer_id: PeerId,
pub reason: String,
pub at: Timestamp,
}Expand description
Voluntary disconnect notification.
Sent by a peer cleanly leaving the mesh so the coordinator can remove its registration without waiting for the heartbeat timeout.
Fields§
§peer_id: PeerIdIdentifier of the disconnecting peer.
reason: StringHuman-readable disconnect reason for the coordinator’s logs.
at: TimestampWhen the peer captured this disconnect.
Trait Implementations§
Source§impl Clone for Disconnect
impl Clone for Disconnect
Source§fn clone(&self) -> Disconnect
fn clone(&self) -> Disconnect
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 Disconnect
impl Debug for Disconnect
Source§impl<'de> Deserialize<'de> for Disconnect
impl<'de> Deserialize<'de> for Disconnect
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Disconnect
impl PartialEq for Disconnect
Source§fn eq(&self, other: &Disconnect) -> bool
fn eq(&self, other: &Disconnect) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Disconnect
impl Serialize for Disconnect
impl Eq for Disconnect
impl StructuralPartialEq for Disconnect
Auto Trait Implementations§
impl Freeze for Disconnect
impl RefUnwindSafe for Disconnect
impl Send for Disconnect
impl Sync for Disconnect
impl Unpin for Disconnect
impl UnsafeUnpin for Disconnect
impl UnwindSafe for Disconnect
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