pub struct KademliaHandlerProto<T> { /* private fields */ }
Expand description
A prototype from which KademliaHandler
s can be constructed.
Implementations
sourceimpl<T> KademliaHandlerProto<T>
impl<T> KademliaHandlerProto<T>
pub fn new(config: KademliaHandlerConfig) -> KademliaHandlerProto<T>
Trait Implementations
sourceimpl<T> IntoProtocolsHandler for KademliaHandlerProto<T> where
T: 'static + Clone + Send,
impl<T> IntoProtocolsHandler for KademliaHandlerProto<T> where
T: 'static + Clone + Send,
type Handler = KademliaHandler<T>
type Handler = KademliaHandler<T>
The protocols handler.
sourcepub fn into_handler(
self,
&PeerId,
endpoint: &ConnectedPoint
) -> <KademliaHandlerProto<T> as IntoProtocolsHandler>::Handler
pub fn into_handler(
self,
&PeerId,
endpoint: &ConnectedPoint
) -> <KademliaHandlerProto<T> as IntoProtocolsHandler>::Handler
Builds the protocols handler. Read more
sourcepub fn inbound_protocol(
&self
) -> <<KademliaHandlerProto<T> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
pub fn inbound_protocol(
&self
) -> <<KademliaHandlerProto<T> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
Return the handler’s inbound protocol.
sourcefn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
Builds an implementation of IntoProtocolsHandler
that handles both this protocol and the
other one together. Read more
sourcefn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>
fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>
Creates a builder that will allow creating a NodeHandler
that handles this protocol
exclusively. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for KademliaHandlerProto<T> where
T: RefUnwindSafe,
impl<T> Send for KademliaHandlerProto<T> where
T: Send,
impl<T> Sync for KademliaHandlerProto<T> where
T: Sync,
impl<T> Unpin for KademliaHandlerProto<T> where
T: Unpin,
impl<T> UnwindSafe for KademliaHandlerProto<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more