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.Auto Trait Implementations§
impl<TProto1, TProto2> RefUnwindSafe for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: RefUnwindSafe, TProto2: RefUnwindSafe,
impl<TProto1, TProto2> Send for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: Send, TProto2: Send,
impl<TProto1, TProto2> Sync for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: Sync, TProto2: Sync,
impl<TProto1, TProto2> Unpin for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: Unpin, TProto2: Unpin,
impl<TProto1, TProto2> UnwindSafe for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: UnwindSafe, TProto2: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more