Enum sc_peerset::Message

source ·
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

Fields

§set_id: SetId
§peer_id: PeerId

Peer to connect to.

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

§

Drop

Fields

§set_id: SetId
§peer_id: PeerId

Peer to disconnect from.

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

§

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 ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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.