pub enum GossipEvent {
NeighborUp(NodeId),
NeighborDown(NodeId),
Received(Message),
}
Available on crate feature
net
only.Expand description
Events emitted from a gossip topic.
These are the events emitted from a GossipReceiver
, wrapped in Event::Gossip
.
Variants§
NeighborUp(NodeId)
We have a new, direct neighbor in the swarm membership layer for this topic.
NeighborDown(NodeId)
We dropped direct neighbor in the swarm membership layer for this topic.
Received(Message)
We received a gossip message for this topic.
Trait Implementations§
Source§impl Clone for GossipEvent
impl Clone for GossipEvent
Source§fn clone(&self) -> GossipEvent
fn clone(&self) -> GossipEvent
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 GossipEvent
impl Debug for GossipEvent
Source§impl<'de> Deserialize<'de> for GossipEvent
impl<'de> Deserialize<'de> for GossipEvent
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 From<Event<PublicKey>> for GossipEvent
impl From<Event<PublicKey>> for GossipEvent
Source§impl Ord for GossipEvent
impl Ord for GossipEvent
Source§fn cmp(&self, other: &GossipEvent) -> Ordering
fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GossipEvent
impl PartialEq for GossipEvent
Source§impl PartialOrd for GossipEvent
impl PartialOrd for GossipEvent
Source§impl Serialize for GossipEvent
impl Serialize for GossipEvent
impl Eq for GossipEvent
impl StructuralPartialEq for GossipEvent
Auto Trait Implementations§
impl !Freeze for GossipEvent
impl RefUnwindSafe for GossipEvent
impl Send for GossipEvent
impl Sync for GossipEvent
impl Unpin for GossipEvent
impl UnwindSafe for GossipEvent
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.