pub enum ConnectionNotification {
NewPeer(ConnectionMetadata, Arc<NetworkContext>),
LostPeer(ConnectionMetadata, Arc<NetworkContext>, DisconnectReason),
}
Variants§
NewPeer(ConnectionMetadata, Arc<NetworkContext>)
Connection with a new peer has been established.
LostPeer(ConnectionMetadata, Arc<NetworkContext>, DisconnectReason)
Connection to a peer has been terminated. This could have been triggered from either end.
Trait Implementations§
source§impl Clone for ConnectionNotification
impl Clone for ConnectionNotification
source§fn clone(&self) -> ConnectionNotification
fn clone(&self) -> ConnectionNotification
Returns a copy of the value. Read more
1.0.0 · 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 ConnectionNotification
impl Debug for ConnectionNotification
source§impl Display for ConnectionNotification
impl Display for ConnectionNotification
source§impl PartialEq<ConnectionNotification> for ConnectionNotification
impl PartialEq<ConnectionNotification> for ConnectionNotification
source§fn eq(&self, other: &ConnectionNotification) -> bool
fn eq(&self, other: &ConnectionNotification) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ConnectionNotification
impl Serialize for ConnectionNotification
impl StructuralPartialEq for ConnectionNotification
Auto Trait Implementations§
impl RefUnwindSafe for ConnectionNotification
impl Send for ConnectionNotification
impl Sync for ConnectionNotification
impl Unpin for ConnectionNotification
impl UnwindSafe for ConnectionNotification
Blanket Implementations§
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>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.