[][src]Struct libp2p::swarm::ProtocolsHandlerSelect

pub struct ProtocolsHandlerSelect<TProto1, TProto2> { /* fields omitted */ }

Implementation of ProtocolsHandler that combines two protocols into one.

Trait Implementations

impl<TProto1, TProto2> Clone for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: Clone,
    TProto2: Clone
[src]

impl<TProto1, TProto2> Debug for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: Debug,
    TProto2: Debug
[src]

impl<TProto1, TProto2> ProtocolsHandler for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: ProtocolsHandler,
    TProto2: ProtocolsHandler
[src]

type InEvent = EitherOutput<<TProto1 as ProtocolsHandler>::InEvent, <TProto2 as ProtocolsHandler>::InEvent>

Custom event that can be received from the outside.

type OutEvent = EitherOutput<<TProto1 as ProtocolsHandler>::OutEvent, <TProto2 as ProtocolsHandler>::OutEvent>

Custom event that can be produced by the handler and that will be returned to the outside.

type Error = EitherError<<TProto1 as ProtocolsHandler>::Error, <TProto2 as ProtocolsHandler>::Error>

The type of errors returned by [ProtocolsHandler::poll].

type InboundProtocol = SelectUpgrade<SendWrapper<<TProto1 as ProtocolsHandler>::InboundProtocol>, SendWrapper<<TProto2 as ProtocolsHandler>::InboundProtocol>>

The inbound upgrade for the protocol(s) used by the handler.

type OutboundProtocol = EitherUpgrade<SendWrapper<<TProto1 as ProtocolsHandler>::OutboundProtocol>, SendWrapper<<TProto2 as ProtocolsHandler>::OutboundProtocol>>

The outbound upgrade for the protocol(s) used by the handler.

type OutboundOpenInfo = EitherOutput<<TProto1 as ProtocolsHandler>::OutboundOpenInfo, <TProto2 as ProtocolsHandler>::OutboundOpenInfo>

The type of additional information passed to an OutboundSubstreamRequest.

Auto Trait Implementations

impl<TProto1, TProto2> RefUnwindSafe for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: RefUnwindSafe,
    TProto2: RefUnwindSafe

impl<TProto1, TProto2> Send for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: Send,
    TProto2: Send

impl<TProto1, TProto2> Sync for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: Sync,
    TProto2: Sync

impl<TProto1, TProto2> Unpin for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: Unpin,
    TProto2: Unpin

impl<TProto1, TProto2> UnwindSafe for ProtocolsHandlerSelect<TProto1, TProto2> where
    TProto1: UnwindSafe,
    TProto2: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoProtocolsHandler for T where
    T: ProtocolsHandler
[src]

type Handler = T

The protocols handler.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,