Struct libp2p_swarm::protocols_handler::MapOutEvent[][src]

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

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

Trait Implementations

impl<TProtoHandler, TMap, TNewOut> ProtocolsHandler for MapOutEvent<TProtoHandler, TMap> where
    TProtoHandler: ProtocolsHandler,
    TMap: FnMut(TProtoHandler::OutEvent) -> TNewOut,
    TNewOut: Send + 'static,
    TMap: Send + 'static, 
[src]

type InEvent = TProtoHandler::InEvent

Custom event that can be received from the outside.

type OutEvent = TNewOut

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, TMap> RefUnwindSafe for MapOutEvent<TProtoHandler, TMap> where
    TMap: RefUnwindSafe,
    TProtoHandler: RefUnwindSafe
[src]

impl<TProtoHandler, TMap> Send for MapOutEvent<TProtoHandler, TMap> where
    TMap: Send,
    TProtoHandler: Send
[src]

impl<TProtoHandler, TMap> Sync for MapOutEvent<TProtoHandler, TMap> where
    TMap: Sync,
    TProtoHandler: Sync
[src]

impl<TProtoHandler, TMap> Unpin for MapOutEvent<TProtoHandler, TMap> where
    TMap: Unpin,
    TProtoHandler: Unpin
[src]

impl<TProtoHandler, TMap> UnwindSafe for MapOutEvent<TProtoHandler, TMap> where
    TMap: UnwindSafe,
    TProtoHandler: UnwindSafe
[src]

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