Struct libp2p::swarm::protocols_handler::multi::MultiHandler [−][src]
A ProtocolsHandler
for multiple ProtocolsHandler
s of the same type.
Implementations
impl<K, H> MultiHandler<K, H> where
K: Hash + Eq,
H: ProtocolsHandler,
[src][−]
K: Hash + Eq,
H: ProtocolsHandler,
pub fn try_from_iter<I>(
iter: I
) -> Result<MultiHandler<K, H>, DuplicateProtonameError> where
I: IntoIterator<Item = (K, H)>,
[src][−]
iter: I
) -> Result<MultiHandler<K, H>, DuplicateProtonameError> where
I: IntoIterator<Item = (K, H)>,
Create and populate a MultiHandler
from the given handler iterator.
It is an error for any two protocols handlers to share the same protocol name.
Note: All handlers should use the same
upgrade::Version
for the inbound and outboundSubstreamProtocol
s.
Trait Implementations
impl<K, H> Clone for MultiHandler<K, H> where
K: Clone,
H: Clone,
[src][+]
K: Clone,
H: Clone,
impl<K, H> Debug for MultiHandler<K, H> where
K: Debug + Eq + Hash,
H: Debug,
[src][+]
K: Debug + Eq + Hash,
H: Debug,
impl<K, H> ProtocolsHandler for MultiHandler<K, H> where
K: Clone + Hash + Eq + Send + 'static,
H: ProtocolsHandler,
<H as ProtocolsHandler>::InboundProtocol: InboundUpgradeSend,
<H as ProtocolsHandler>::OutboundProtocol: OutboundUpgradeSend,
[src][+]
K: Clone + Hash + Eq + Send + 'static,
H: ProtocolsHandler,
<H as ProtocolsHandler>::InboundProtocol: InboundUpgradeSend,
<H as ProtocolsHandler>::OutboundProtocol: OutboundUpgradeSend,
Auto Trait Implementations
impl<K, H> RefUnwindSafe for MultiHandler<K, H> where
H: RefUnwindSafe,
K: RefUnwindSafe,
H: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, H> Send for MultiHandler<K, H> where
H: Send,
K: Send,
H: Send,
K: Send,
impl<K, H> Sync for MultiHandler<K, H> where
H: Sync,
K: Sync,
H: Sync,
K: Sync,
impl<K, H> Unpin for MultiHandler<K, H> where
H: Unpin,
K: Unpin,
H: Unpin,
K: Unpin,
impl<K, H> UnwindSafe for MultiHandler<K, H> where
H: UnwindSafe,
K: UnwindSafe,
H: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoProtocolsHandler for T where
T: ProtocolsHandler,
[src][+]
T: ProtocolsHandler,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,