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

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

Prototype for a NodeHandler.

Associated Types

type Handler: NodeHandler

The node handler.

Loading content...

Required methods

fn into_handler(self, remote_conn_info: &TConnInfo) -> Self::Handler

Builds the node handler.

The TConnInfo is the information about the connection that the handler is going to handle. This is generated by the Transport and typically implements the ConnectionInfo trait.

Loading content...

Implementors

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

type Handler = T

impl<TIntoProtoHandler, TProtoHandler, TConnInfo> IntoNodeHandler<(TConnInfo, ConnectedPoint)> for NodeHandlerWrapperBuilder<TIntoProtoHandler> where
    TConnInfo: ConnectionInfo<PeerId = PeerId>,
    TIntoProtoHandler: IntoProtocolsHandler<Handler = TProtoHandler>,
    TProtoHandler: ProtocolsHandler
[src]

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

Loading content...