Struct libp2p::swarm::protocols_handler::multi::IntoMultiHandler [−][src]
pub struct IntoMultiHandler<K, H> { /* fields omitted */ }A IntoProtocolsHandler for multiple other IntoProtocolsHandlers.
Implementations
impl<K, H> IntoMultiHandler<K, H> where
K: Hash + Eq,
H: IntoProtocolsHandler, [src]
impl<K, H> IntoMultiHandler<K, H> where
K: Hash + Eq,
H: IntoProtocolsHandler, [src]pub fn try_from_iter<I>(
iter: I
) -> Result<IntoMultiHandler<K, H>, DuplicateProtonameError> where
I: IntoIterator<Item = (K, H)>, [src]
iter: I
) -> Result<IntoMultiHandler<K, H>, DuplicateProtonameError> where
I: IntoIterator<Item = (K, H)>,
Create and populate an IntoMultiHandler from the given iterator.
It is an error for any two protocols handlers to share the same protocol name.
Note: All handlers should use the same
upgrade::Versionfor the inbound and outboundSubstreamProtocols.
Trait Implementations
impl<K, H> Clone for IntoMultiHandler<K, H> where
K: Clone,
H: Clone, [src]
impl<K, H> Clone for IntoMultiHandler<K, H> where
K: Clone,
H: Clone, [src]pub fn clone(&self) -> IntoMultiHandler<K, H>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<K, H> IntoProtocolsHandler for IntoMultiHandler<K, H> where
K: Clone + Eq + Hash + Send + 'static,
H: IntoProtocolsHandler, [src]
impl<K, H> IntoProtocolsHandler for IntoMultiHandler<K, H> where
K: Clone + Eq + Hash + Send + 'static,
H: IntoProtocolsHandler, [src]type Handler = MultiHandler<K, <H as IntoProtocolsHandler>::Handler>
The protocols handler.
pub fn into_handler(
self,
p: &PeerId,
c: &ConnectedPoint
) -> <IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler[src]
self,
p: &PeerId,
c: &ConnectedPoint
) -> <IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler
pub fn inbound_protocol(
&self
) -> <<IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol[src]
&self
) -> <<IntoMultiHandler<K, H> as IntoProtocolsHandler>::Handler as ProtocolsHandler>::InboundProtocol
pub fn select<TProto2>(
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>[src]
self,
other: TProto2
) -> IntoProtocolsHandlerSelect<Self, TProto2>
pub fn into_node_handler_builder(self) -> NodeHandlerWrapperBuilder<Self>[src]
Auto Trait Implementations
impl<K, H> RefUnwindSafe for IntoMultiHandler<K, H> where
H: RefUnwindSafe,
K: RefUnwindSafe,
H: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, H> Send for IntoMultiHandler<K, H> where
H: Send,
K: Send,
H: Send,
K: Send,
impl<K, H> Sync for IntoMultiHandler<K, H> where
H: Sync,
K: Sync,
H: Sync,
K: Sync,
impl<K, H> Unpin for IntoMultiHandler<K, H> where
H: Unpin,
K: Unpin,
H: Unpin,
K: Unpin,
impl<K, H> UnwindSafe for IntoMultiHandler<K, H> where
H: UnwindSafe,
K: UnwindSafe,
H: UnwindSafe,
K: UnwindSafe,