Enum sc_peerset::Message[][src]

pub enum Message {
    Connect {
        set_id: SetId,
        peer_id: PeerId,
    },
    Drop {
        set_id: SetId,
        peer_id: PeerId,
    },
    Accept(IncomingIndex),
    Reject(IncomingIndex),
}
Expand description

Message that can be sent by the peer set manager (PSM).

Variants

Connect

Request to open a connection to the given peer. From the point of view of the PSM, we are immediately connected.

Show fields

Fields of Connect

set_id: SetIdpeer_id: PeerId

Peer to connect to.

Drop

Drop the connection to the given peer, or cancel the connection attempt after a Connect.

Show fields

Fields of Drop

set_id: SetIdpeer_id: PeerId

Peer to disconnect from.

Accept(IncomingIndex)

Equivalent to Connect for the peer corresponding to this incoming index.

Reject(IncomingIndex)

Equivalent to Drop for the peer corresponding to this incoming index.

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.