Enum libp2p_floodsub::FloodsubEvent
source · pub enum FloodsubEvent {
Message(FloodsubMessage),
Subscribed {
peer_id: PeerId,
topic: TopicHash,
},
Unsubscribed {
peer_id: PeerId,
topic: TopicHash,
},
}
Expand description
Event that can happen on the floodsub behaviour.
Variants
Message(FloodsubMessage)
A message has been received.
Subscribed
A remote subscribed to a topic.
Unsubscribed
Fields
peer_id: PeerId
Remote that has unsubscribed.
topic: TopicHash
The topic it has subscribed from.
A remote unsubscribed from a topic.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FloodsubEvent
impl Send for FloodsubEvent
impl Sync for FloodsubEvent
impl Unpin for FloodsubEvent
impl UnwindSafe for FloodsubEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more