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

Fields

peer_id: PeerId

Remote that has subscribed.

topic: TopicHash

The topic it has subscribed to.

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.