Struct libp2p_swarm::IntoProtocolsHandlerSelect
source · [−]pub struct IntoProtocolsHandlerSelect<TProto1, TProto2> { /* private fields */ }
Expand description
Implementation of IntoProtocolsHandler
that combines two protocols into one.
Implementations
Trait Implementations
impl<TProto1, TProto2> IntoProtocolsHandler for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
impl<TProto1, TProto2> IntoProtocolsHandler for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: IntoProtocolsHandler,
TProto2: IntoProtocolsHandler,
type Handler = ProtocolsHandlerSelect<TProto1::Handler, TProto2::Handler>
type Handler = ProtocolsHandlerSelect<TProto1::Handler, TProto2::Handler>
The protocols handler.
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
Return the handler’s inbound protocol.
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2> where
Self: Sized,
fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2> where
Self: Sized,
Builds an implementation of IntoProtocolsHandler
that handles both this protocol and the
other one together. Read more
Creates a builder that will allow creating a NodeHandler
that handles this protocol
exclusively. Read more
Auto Trait Implementations
impl<TProto1, TProto2> RefUnwindSafe for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: RefUnwindSafe,
TProto2: RefUnwindSafe,
impl<TProto1, TProto2> Send for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: Send,
TProto2: Send,
impl<TProto1, TProto2> Sync for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: Sync,
TProto2: Sync,
impl<TProto1, TProto2> Unpin for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: Unpin,
TProto2: Unpin,
impl<TProto1, TProto2> UnwindSafe for IntoProtocolsHandlerSelect<TProto1, TProto2> where
TProto1: UnwindSafe,
TProto2: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more