[−][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>
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
Builds an implementation of IntoProtocolsHandler
that handles both this protocol and the
other one together.
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>
Creates a builder that will allow creating a NodeHandler
that handles this protocol
exclusively.
Implementors
impl<T> IntoProtocolsHandler for T where
T: ProtocolsHandler,
[src]
T: ProtocolsHandler,
type Handler = T
fn into_handler(self, &PeerId) -> T
[src]
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
[src]
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>
[src]
impl<TInner> IntoProtocolsHandler for ToggleIntoProtoHandler<TInner> where
TInner: IntoProtocolsHandler,
[src]
TInner: IntoProtocolsHandler,
type Handler = ToggleProtoHandler<<TInner as IntoProtocolsHandler>::Handler>
fn into_handler(
self,
remote_peer_id: &PeerId
) -> <ToggleIntoProtoHandler<TInner> as IntoProtocolsHandler>::Handler
[src]
self,
remote_peer_id: &PeerId
) -> <ToggleIntoProtoHandler<TInner> as IntoProtocolsHandler>::Handler
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
[src]
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>
[src]
impl<TProto1, TProto2, TSubstream> IntoProtocolsHandler for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
TSubstream: AsyncRead + AsyncWrite,
<TProto1 as IntoProtocolsHandler>::Handler: ProtocolsHandler,
<TProto2 as IntoProtocolsHandler>::Handler: ProtocolsHandler,
<<TProto1 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<<TProto2 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<<TProto1 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
<<TProto2 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
<<TProto1 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::Substream == TSubstream,
<<TProto2 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::Substream == TSubstream,
[src]
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
TSubstream: AsyncRead + AsyncWrite,
<TProto1 as IntoProtocolsHandler>::Handler: ProtocolsHandler,
<TProto2 as IntoProtocolsHandler>::Handler: ProtocolsHandler,
<<TProto1 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<<TProto2 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol: InboundUpgrade<TSubstream>,
<<TProto1 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
<<TProto2 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::OutboundProtocol: OutboundUpgrade<TSubstream>,
<<TProto1 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::Substream == TSubstream,
<<TProto2 as IntoProtocolsHandler>::Handler as ProtocolsHandler>::Substream == TSubstream,
type Handler = ProtocolsHandlerSelect<<TProto1 as IntoProtocolsHandler>::Handler, <TProto2 as IntoProtocolsHandler>::Handler>
fn into_handler(
self,
remote_peer_id: &PeerId
) -> <IntoProtocolsHandlerSelect<TProto1, TProto2> as IntoProtocolsHandler>::Handler
[src]
self,
remote_peer_id: &PeerId
) -> <IntoProtocolsHandlerSelect<TProto1, TProto2> as IntoProtocolsHandler>::Handler
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
[src]
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>