Struct libp2p_swarm::handler::IntoConnectionHandlerSelect
source · pub struct IntoConnectionHandlerSelect<TProto1, TProto2> { /* private fields */ }
Expand description
Implementation of IntoConnectionHandler
that combines two protocols into one.
Implementations§
source§impl<TProto1, TProto2> IntoConnectionHandlerSelect<TProto1, TProto2>
impl<TProto1, TProto2> IntoConnectionHandlerSelect<TProto1, TProto2>
pub fn into_inner(self) -> (TProto1, TProto2)
Trait Implementations§
source§impl<TProto1: Clone, TProto2: Clone> Clone for IntoConnectionHandlerSelect<TProto1, TProto2>
impl<TProto1: Clone, TProto2: Clone> Clone for IntoConnectionHandlerSelect<TProto1, TProto2>
source§fn clone(&self) -> IntoConnectionHandlerSelect<TProto1, TProto2>
fn clone(&self) -> IntoConnectionHandlerSelect<TProto1, TProto2>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<TProto1, TProto2> IntoConnectionHandler for IntoConnectionHandlerSelect<TProto1, TProto2>where
TProto1: IntoConnectionHandler,
TProto2: IntoConnectionHandler,
impl<TProto1, TProto2> IntoConnectionHandler for IntoConnectionHandlerSelect<TProto1, TProto2>where
TProto1: IntoConnectionHandler,
TProto2: IntoConnectionHandler,
§type Handler = ConnectionHandlerSelect<<TProto1 as IntoConnectionHandler>::Handler, <TProto2 as IntoConnectionHandler>::Handler>
type Handler = ConnectionHandlerSelect<<TProto1 as IntoConnectionHandler>::Handler, <TProto2 as IntoConnectionHandler>::Handler>
The protocols handler.
source§fn into_handler(
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> Self::Handler
fn into_handler(
self,
remote_peer_id: &PeerId,
connected_point: &ConnectedPoint
) -> Self::Handler
Builds the protocols handler. Read more
source§fn inbound_protocol(
&self
) -> <Self::Handler as ConnectionHandler>::InboundProtocol
fn inbound_protocol(
&self
) -> <Self::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