pub trait IntoConnectionHandler: Send + 'static {
    type Handler: ConnectionHandler;

    fn into_handler(
        self,
        remote_peer_id: &PeerId,
        connected_point: &ConnectedPoint
    ) -> Self::Handler; fn inbound_protocol(
        &self
    ) -> <Self::Handler as ConnectionHandler>::InboundProtocol; fn select<TProto2>(
        self,
        other: TProto2
    ) -> IntoConnectionHandlerSelect<Self, TProto2>
    where
        Self: Sized
, { ... } }
Expand description

Prototype for a ConnectionHandler.

Required Associated Types

The protocols handler.

Required Methods

Builds the protocols handler.

The PeerId is the id of the node the handler is going to handle.

Return the handler’s inbound protocol.

Provided Methods

Builds an implementation of IntoConnectionHandler that handles both this protocol and the other one together.

Implementors

Implementation of a IntoConnectionHandler that represents either of two IntoConnectionHandler implementations.