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, TProto2> Clone for IntoConnectionHandlerSelect<TProto1, TProto2>where
TProto1: Clone,
TProto2: Clone,
impl<TProto1, TProto2> Clone for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: Clone, TProto2: Clone,
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> Debug for IntoConnectionHandlerSelect<TProto1, TProto2>where
TProto1: Debug,
TProto2: Debug,
impl<TProto1, TProto2> Debug for IntoConnectionHandlerSelect<TProto1, TProto2>where TProto1: Debug, TProto2: Debug,
source§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
) -> <IntoConnectionHandlerSelect<TProto1, TProto2> as IntoConnectionHandler>::Handler
fn into_handler( self, remote_peer_id: &PeerId, connected_point: &ConnectedPoint ) -> <IntoConnectionHandlerSelect<TProto1, TProto2> as IntoConnectionHandler>::Handler
Builds the protocols handler. Read more
source§fn inbound_protocol(
&self
) -> <<IntoConnectionHandlerSelect<TProto1, TProto2> as IntoConnectionHandler>::Handler as ConnectionHandler>::InboundProtocol
fn inbound_protocol( &self ) -> <<IntoConnectionHandlerSelect<TProto1, TProto2> 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.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