Enum libp2p::floodsub::FloodsubEvent[][src]

pub enum FloodsubEvent {
    Message(FloodsubMessage),
    Subscribed {
        peer_id: PeerId,
        topic: Topic,
    },
    Unsubscribed {
        peer_id: PeerId,
        topic: Topic,
    },
}
Expand description

Event that can happen on the floodsub behaviour.

Variants

A message has been received.

Tuple Fields of Message

0: FloodsubMessage
Subscribed

A remote subscribed to a topic.

Fields of Subscribed

peer_id: PeerId

Remote that has subscribed.

topic: Topic

The topic it has subscribed to.

Unsubscribed

A remote unsubscribed from a topic.

Fields of Unsubscribed

peer_id: PeerId

Remote that has unsubscribed.

topic: Topic

The topic it has subscribed from.

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

Performs the conversion.

Performs the conversion.

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.