Struct libp2p_swarm::protocols_handler::multi::IntoMultiHandler
source · [−]pub struct IntoMultiHandler<K, H> { /* private fields */ }
Expand description
A IntoProtocolsHandler
for multiple other IntoProtocolsHandler
s.
Implementations
pub fn try_from_iter<I>(iter: I) -> Result<Self, DuplicateProtonameError> where
I: IntoIterator<Item = (K, H)>,
pub fn try_from_iter<I>(iter: I) -> Result<Self, 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.
Trait Implementations
impl<K, H> IntoProtocolsHandler for IntoMultiHandler<K, H> where
K: Debug + Clone + Eq + Hash + Send + 'static,
H: IntoProtocolsHandler,
impl<K, H> IntoProtocolsHandler for IntoMultiHandler<K, H> where
K: Debug + Clone + Eq + Hash + Send + 'static,
H: IntoProtocolsHandler,
type Handler = MultiHandler<K, H::Handler>
type Handler = MultiHandler<K, H::Handler>
The protocols 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<K, H> RefUnwindSafe for IntoMultiHandler<K, H> where
H: RefUnwindSafe,
K: RefUnwindSafe,
impl<K, H> Send for IntoMultiHandler<K, H> where
H: Send,
K: Send,
impl<K, H> Sync for IntoMultiHandler<K, H> where
H: Sync,
K: Sync,
impl<K, H> Unpin for IntoMultiHandler<K, H> where
H: Unpin,
K: Unpin,
impl<K, H> UnwindSafe for IntoMultiHandler<K, H> where
H: UnwindSafe,
K: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more