[−][src]Trait libp2p_core::protocols_handler::IntoProtocolsHandler
Prototype for a ProtocolsHandler
.
Associated Types
type Handler: ProtocolsHandler
The protocols handler.
Required methods
fn into_handler(self, remote_peer_id: &PeerId) -> Self::Handler
Builds the protocols handler.
The PeerId
is the id of the node the handler is going to handle.
Provided methods
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2> where
Self: Sized,
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2> where
Self: Sized,
Builds an implementation of IntoProtocolsHandler
that handles both this protocol and the
other one together.
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self> where
Self: Sized,
Self: Sized,
Creates a builder that will allow creating a NodeHandler
that handles this protocol
exclusively.
Implementors
impl<T> IntoProtocolsHandler for T where
T: ProtocolsHandler,
[src]
impl<T> IntoProtocolsHandler for T where
T: ProtocolsHandler,
type Handler = Self
fn into_handler(self, _: &PeerId) -> Self | [src] |
fn select<TProto2>( | [src] |
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self> where | [src] |
impl<TProto1, TProto2, TSubstream> IntoProtocolsHandler for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
TProto1::Handler: ProtocolsHandler<Substream = TSubstream>,
TProto2::Handler: ProtocolsHandler<Substream = TSubstream>,
TSubstream: AsyncRead + AsyncWrite,
<TProto1::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<TProto2::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<TProto1::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
<TProto2::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
[src]
impl<TProto1, TProto2, TSubstream> IntoProtocolsHandler for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
TProto1::Handler: ProtocolsHandler<Substream = TSubstream>,
TProto2::Handler: ProtocolsHandler<Substream = TSubstream>,
TSubstream: AsyncRead + AsyncWrite,
<TProto1::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<TProto2::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<TProto1::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
<TProto2::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
type Handler = ProtocolsHandlerSelect<TProto1::Handler, TProto2::Handler>
fn into_handler(self, remote_peer_id: &PeerId) -> Self::Handler | [src] |
fn select<TProto2>( | [src] |
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self> where | [src] |