Struct libp2p::kad::handler::KademliaHandlerProto
source · pub struct KademliaHandlerProto<T> { /* private fields */ }
Expand description
A prototype from which KademliaHandler
s can be constructed.
Implementations§
source§impl<T> KademliaHandlerProto<T>
impl<T> KademliaHandlerProto<T>
pub fn new(config: KademliaHandlerConfig) -> KademliaHandlerProto<T>
Trait Implementations§
source§impl<T> IntoConnectionHandler for KademliaHandlerProto<T>where
T: 'static + Clone + Debug + Send,
impl<T> IntoConnectionHandler for KademliaHandlerProto<T>where
T: 'static + Clone + Debug + Send,
§type Handler = KademliaHandler<T>
type Handler = KademliaHandler<T>
The protocols handler.
source§fn into_handler(
self,
remote_peer_id: &PeerId,
endpoint: &ConnectedPoint
) -> <KademliaHandlerProto<T> as IntoConnectionHandler>::Handler
fn into_handler(
self,
remote_peer_id: &PeerId,
endpoint: &ConnectedPoint
) -> <KademliaHandlerProto<T> as IntoConnectionHandler>::Handler
Builds the protocols handler. Read more
source§fn inbound_protocol(
&self
) -> <<KademliaHandlerProto<T> as IntoConnectionHandler>::Handler as ConnectionHandler>::InboundProtocol
fn inbound_protocol(
&self
) -> <<KademliaHandlerProto<T> as IntoConnectionHandler>::Handler as ConnectionHandler>::InboundProtocol
Return the handler’s inbound protocol.
source§fn select<TProto2>(
self,
other: TProto2
) -> IntoConnectionHandlerSelect<Self, TProto2>where
Self: Sized,
fn select<TProto2>(
self,
other: TProto2
) -> IntoConnectionHandlerSelect<Self, TProto2>where
Self: Sized,
Builds an implementation of
IntoConnectionHandler
that handles both this protocol and the
other one together. Read more