pub enum Event<PI> {
NeighborUp(PI),
NeighborDown(PI),
Received(GossipEvent<PI>),
}
Expand description
An event to be emitted to the application for a particular topic.
Variants§
NeighborUp(PI)
We have a new, direct neighbor in the swarm membership layer for this topic
NeighborDown(PI)
We dropped direct neighbor in the swarm membership layer for this topic
Received(GossipEvent<PI>)
A gossip message was received for this topic
Trait Implementations§
Source§impl<'de, PI> Deserialize<'de> for Event<PI>where
PI: Deserialize<'de>,
impl<'de, PI> Deserialize<'de> for Event<PI>where
PI: Deserialize<'de>,
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
Available on crate feature net
only.
impl From<Event<PublicKey>> for GossipEvent
Available on crate feature
net
only.Source§impl<PI: Ord> Ord for Event<PI>
impl<PI: Ord> Ord for Event<PI>
Source§impl<PI: PartialOrd> PartialOrd for Event<PI>
impl<PI: PartialOrd> PartialOrd for Event<PI>
impl<PI: Eq> Eq for Event<PI>
impl<PI> StructuralPartialEq for Event<PI>
Auto Trait Implementations§
impl<PI> !Freeze for Event<PI>
impl<PI> RefUnwindSafe for Event<PI>where
PI: RefUnwindSafe,
impl<PI> Send for Event<PI>where
PI: Send,
impl<PI> Sync for Event<PI>where
PI: Sync,
impl<PI> Unpin for Event<PI>where
PI: Unpin,
impl<PI> UnwindSafe for Event<PI>where
PI: UnwindSafe,
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.