Trait libp2p::swarm::IntoProtocolsHandler[][src]

pub trait IntoProtocolsHandler: 'static + Send {
    type Handler: ProtocolsHandler;
    fn into_handler(
        self,
        remote_peer_id: &PeerId,
        connected_point: &ConnectedPoint
    ) -> Self::Handler;
fn inbound_protocol(
        &self
    ) -> <Self::Handler as ProtocolsHandler>::InboundProtocol; fn select<TProto2>(
        self,
        other: TProto2
    ) -> IntoProtocolsHandlerSelect<Self, TProto2> { ... }
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self> { ... } }
Expand description

Prototype for a ProtocolsHandler.

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 IntoProtocolsHandler that handles both this protocol and the other one together.

Creates a builder that will allow creating a NodeHandler that handles this protocol exclusively.

Implementors