Enum bee_network::Command[][src]

#[non_exhaustive]
pub enum Command {
    AddPeer {
        peer_id: PeerId,
        multiaddr: Multiaddr,
        alias: Option<String>,
        relation: PeerRelation,
    },
    RemovePeer {
        peer_id: PeerId,
    },
    DialPeer {
        peer_id: PeerId,
    },
    DialAddress {
        address: Multiaddr,
    },
    DisconnectPeer {
        peer_id: PeerId,
    },
    BanPeer {
        peer_id: PeerId,
    },
    UnbanPeer {
        peer_id: PeerId,
    },
    BanAddress {
        address: Multiaddr,
    },
    UnbanAddress {
        address: Multiaddr,
    },
    ChangeRelation {
        peer_id: PeerId,
        to: PeerRelation,
    },
}
Expand description

Describes the commands accepted 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.
AddPeer

Adds a peer.

Fields of AddPeer

peer_id: PeerId

The peer’s id.

multiaddr: Multiaddr

The peer’s address.

alias: Option<String>

The peer’s optional alias.

relation: PeerRelation

The relation with that peer.

RemovePeer

Removes a peer.

Fields of RemovePeer

peer_id: PeerId

The peer’s id.

DialPeer

Dials a peer.

Fields of DialPeer

peer_id: PeerId

The peer’s id.

DialAddress

Dials an address.

Fields of DialAddress

address: Multiaddr

The peer’s address.

DisconnectPeer

Disconnects a peer.

Fields of DisconnectPeer

peer_id: PeerId

The peer’s id.

BanPeer

Bans a peer.

Fields of BanPeer

peer_id: PeerId

The peer’s id.

UnbanPeer

Unbans a peer.

Fields of UnbanPeer

peer_id: PeerId

The peer’s id.

BanAddress

Bans an address.

Fields of BanAddress

address: Multiaddr

The peer’s address.

UnbanAddress

Unbans an address.

Fields of UnbanAddress

address: Multiaddr

The peer’s address.

ChangeRelation

Upgrades the relation with a peer.

Fields of ChangeRelation

peer_id: PeerId

The peer’s id.

to: PeerRelation

The peer’s new relation.

Trait Implementations

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.