Enum bee_network::Event[][src]

#[non_exhaustive]
pub enum Event {
    AddressBanned {
        address: Multiaddr,
    },
    AddressUnbanned {
        address: Multiaddr,
    },
    AddressBound {
        address: Multiaddr,
    },
    CommandFailed {
        command: Command,
        reason: PeerError,
    },
    LocalIdCreated {
        local_id: PeerId,
    },
    PeerAdded {
        peer_id: PeerId,
        info: PeerInfo,
    },
    PeerBanned {
        peer_id: PeerId,
    },
    PeerConnected {
        peer_id: PeerId,
        info: PeerInfo,
        gossip_in: GossipReceiver,
        gossip_out: GossipSender,
    },
    PeerDisconnected {
        peer_id: PeerId,
    },
    PeerRemoved {
        peer_id: PeerId,
    },
    PeerUnbanned {
        peer_id: PeerId,
    },
}
Expand description

Describes the public events produced by the networking layer.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
AddressBanned

An address was banned.

Fields of AddressBanned

address: Multiaddr

The peer’s address.

AddressUnbanned

An address was unbanned.

Fields of AddressUnbanned

address: Multiaddr

The peer’s address.

AddressBound

An address was bound.

Fields of AddressBound

address: Multiaddr

The assigned bind address.

CommandFailed

A command failed.

Fields of CommandFailed

command: Command

The command that failed.

reason: PeerError

The reason for the failure.

LocalIdCreated

The local peer id was created.

Fields of LocalIdCreated

local_id: PeerId

The created peer id from the Ed25519 keypair.

PeerAdded

A peer was added.

Fields of PeerAdded

peer_id: PeerId

The peer’s id.

info: PeerInfo

The peer’s info.

PeerBanned

A peer was banned.

Fields of PeerBanned

peer_id: PeerId

The peer’s id.

PeerConnected

A peer was connected.

Fields of PeerConnected

peer_id: PeerId

The peer’s id.

info: PeerInfo

The peer’s info.

gossip_in: GossipReceiver

The peer’s message recv channel.

gossip_out: GossipSender

The peer’s message send channel.

PeerDisconnected

A peer was disconnected.

Fields of PeerDisconnected

peer_id: PeerId

The peer’s id.

PeerRemoved

A peer was removed.

Fields of PeerRemoved

peer_id: PeerId

The peer’s id.

PeerUnbanned

A peer was unbanned.

Fields of PeerUnbanned

peer_id: PeerId

The peer’s id.

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.