[][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: Clone, TProto2: Clone> Clone for ProtocolsHandlerSelect<TProto1, TProto2>[src]

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

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

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

Custom event that can be received from the outside.

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

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

type Error = EitherError<TProto1::Error, TProto2::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::OutboundProtocol>, SendWrapper<TProto2::OutboundProtocol>>

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

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

The type of additional information passed to an OutboundSubstreamRequest.

type InboundOpenInfo = (TProto1::InboundOpenInfo, TProto2::InboundOpenInfo)

The type of additional information returned from listen_protocol.

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>,