[][src]Trait libp2p::core::nodes::handled_node_tasks::IntoNodeHandler

pub trait IntoNodeHandler<TPeerId = PeerId> {
    type Handler: NodeHandler;
    fn into_handler(self, remote_peer_id: &TPeerId) -> Self::Handler;
}

Prototype for a NodeHandler.

Associated Types

type Handler: NodeHandler

The node handler.

Loading content...

Required methods

fn into_handler(self, remote_peer_id: &TPeerId) -> Self::Handler

Builds the node handler.

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

Loading content...

Implementors

impl<T, TPeerId> IntoNodeHandler<TPeerId> for T where
    T: NodeHandler
[src]

type Handler = T

impl<TIntoProtoHandler, TProtoHandler> IntoNodeHandler<PeerId> for NodeHandlerWrapperBuilder<TIntoProtoHandler> where
    TIntoProtoHandler: IntoProtocolsHandler<Handler = TProtoHandler>,
    TProtoHandler: ProtocolsHandler,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Error: Debug
[src]

type Handler = NodeHandlerWrapper<<TIntoProtoHandler as IntoProtocolsHandler>::Handler>

Loading content...