Struct libp2p_swarm::protocols_handler::MapInEvent[][src]

pub struct MapInEvent<TProtoHandler, TNewIn, TMap> { /* fields omitted */ }

Wrapper around a protocol handler that turns the input event into something else.

Trait Implementations

impl<TProtoHandler, TMap, TNewIn> ProtocolsHandler for MapInEvent<TProtoHandler, TNewIn, TMap> where
    TProtoHandler: ProtocolsHandler,
    TMap: Fn(TNewIn) -> Option<TProtoHandler::InEvent>,
    TNewIn: Send + 'static,
    TMap: Send + 'static, 
[src]

type InEvent = TNewIn

Custom event that can be received from the outside.

type OutEvent = TProtoHandler::OutEvent

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

type Error = TProtoHandler::Error

The type of errors returned by ProtocolsHandler::poll.

type InboundProtocol = TProtoHandler::InboundProtocol

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

type OutboundProtocol = TProtoHandler::OutboundProtocol

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

type InboundOpenInfo = TProtoHandler::InboundOpenInfo

The type of additional information returned from listen_protocol.

type OutboundOpenInfo = TProtoHandler::OutboundOpenInfo

The type of additional information passed to an OutboundSubstreamRequest.

Auto Trait Implementations

impl<TProtoHandler, TNewIn, TMap> RefUnwindSafe for MapInEvent<TProtoHandler, TNewIn, TMap> where
    TMap: RefUnwindSafe,
    TNewIn: RefUnwindSafe,
    TProtoHandler: RefUnwindSafe

impl<TProtoHandler, TNewIn, TMap> Send for MapInEvent<TProtoHandler, TNewIn, TMap> where
    TMap: Send,
    TNewIn: Send,
    TProtoHandler: Send

impl<TProtoHandler, TNewIn, TMap> Sync for MapInEvent<TProtoHandler, TNewIn, TMap> where
    TMap: Sync,
    TNewIn: Sync,
    TProtoHandler: Sync

impl<TProtoHandler, TNewIn, TMap> Unpin for MapInEvent<TProtoHandler, TNewIn, TMap> where
    TMap: Unpin,
    TNewIn: Unpin,
    TProtoHandler: Unpin

impl<TProtoHandler, TNewIn, TMap> UnwindSafe for MapInEvent<TProtoHandler, TNewIn, TMap> where
    TMap: UnwindSafe,
    TNewIn: UnwindSafe,
    TProtoHandler: 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[src]

type Output = T

Should always be Self

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>, 
[src]