Trait libp2p::swarm::IntoProtocolsHandler [−][src]
Prototype for a ProtocolsHandler
.
Associated Types
type Handler: ProtocolsHandler
[src]
The protocols handler.
Required methods
pub fn into_handler(
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> Self::Handler
[src]
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> Self::Handler
Builds the protocols handler.
The PeerId
is the id of the node the handler is going to handle.
pub fn inbound_protocol(
&self
) -> <Self::Handler as ProtocolsHandler>::InboundProtocol
[src]
&self
) -> <Self::Handler as ProtocolsHandler>::InboundProtocol
Return the handler’s inbound protocol.
Provided methods
pub fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
[src]
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
Builds an implementation of IntoProtocolsHandler
that handles both this protocol and the
other one together.
pub fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>
[src]
Creates a builder that will allow creating a NodeHandler
that handles this protocol
exclusively.
Implementors
impl<K, H> IntoProtocolsHandler for IntoMultiHandler<K, H> where
K: Clone + Eq + Hash + Send + 'static,
H: IntoProtocolsHandler,
[src]
K: Clone + Eq + Hash + Send + 'static,
H: IntoProtocolsHandler,
type Handler = MultiHandler<K, <H as IntoProtocolsHandler>::Handler>
pub fn into_handler(
self,
p: &PeerId,
c: &ConnectedPoint
) -> <IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler
[src]
self,
p: &PeerId,
c: &ConnectedPoint
) -> <IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler
pub fn inbound_protocol(
&self
) -> <<IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
[src]
&self
) -> <<IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
impl<T> IntoProtocolsHandler for T where
T: ProtocolsHandler,
[src]
T: ProtocolsHandler,
type Handler = T
pub fn into_handler(self, &PeerId, &ConnectedPoint) -> T
[src]
pub fn inbound_protocol(
&self
) -> <<T as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
[src]
&self
) -> <<T as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
impl<TInner> IntoProtocolsHandler for ToggleIntoProtoHandler<TInner> where
TInner: IntoProtocolsHandler,
[src]
TInner: IntoProtocolsHandler,
type Handler = ToggleProtoHandler<<TInner as IntoProtocolsHandler>::Handler>
pub fn into_handler(
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> <ToggleIntoProtoHandler<TInner> as IntoProtocolsHandler>::Handler
[src]
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> <ToggleIntoProtoHandler<TInner> as IntoProtocolsHandler>::Handler
pub fn inbound_protocol(
&self
) -> <<ToggleIntoProtoHandler<TInner> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
[src]
&self
) -> <<ToggleIntoProtoHandler<TInner> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
impl<TProto1, TProto2> IntoProtocolsHandler for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
[src]
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
type Handler = ProtocolsHandlerSelect<<TProto1 as IntoProtocolsHandler>::Handler, <TProto2 as IntoProtocolsHandler>::Handler>
pub fn into_handler(
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> <IntoProtocolsHandlerSelect<TProto1, TProto2> as IntoProtocolsHandler>::Handler
[src]
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> <IntoProtocolsHandlerSelect<TProto1, TProto2> as IntoProtocolsHandler>::Handler
pub fn inbound_protocol(
&self
) -> <<IntoProtocolsHandlerSelect<TProto1, TProto2> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
[src]
&self
) -> <<IntoProtocolsHandlerSelect<TProto1, TProto2> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol