pub struct PeerInterconnect { /* private fields */ }
Expand description

PeerInterconnect will receive incoming messages from peers and dispatch them to the NetworkMessageType handlers. It will also receive messages from handlers that need to be sent to other peers.

When an incoming message is received, the connection ID is converted to a peer ID. The reverse is done for an outgoing message. If a message is received from an unknown connection, the PeerInterconnect will request the current peers from the PeerManager and update the local map of peers.

Implementations

Creates a new NetworkMessageSender that can be used to send messages to peers.

Trait Implementations

Instructs the component to begin shutting down.

For components with threads, this should break out of any loops and ready the threads for being joined.

Waits until the the component has completely shutdown.

For components with threads, the threads should be joined during the call to wait_for_shutdown.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert self to an expression for Diesel’s query builder. Read more

Convert &self to an expression for Diesel’s query builder. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more