[][src]Struct libp2p_swarm::protocols_handler::NodeHandlerWrapper

pub struct NodeHandlerWrapper<TProtoHandler> where
    TProtoHandler: ProtocolsHandler
{ /* fields omitted */ }

Wraps around an implementation of ProtocolsHandler, and implements NodeHandler.

Trait Implementations

impl<TProtoHandler> ConnectionHandler for NodeHandlerWrapper<TProtoHandler> where
    TProtoHandler: ProtocolsHandler
[src]

type InEvent = TProtoHandler::InEvent

The inbound type of events used to notify the handler through the Network. Read more

type OutEvent = TProtoHandler::OutEvent

The outbound type of events that the handler emits to the Network through ConnectionHandler::poll. Read more

type Error = NodeHandlerWrapperError<TProtoHandler::Error>

The type of errors that the handler can produce when polled by the Network.

type Substream = Substream<StreamMuxerBox>

The type of the substream containing the data.

type OutboundOpenInfo = (u64, TProtoHandler::OutboundOpenInfo, Duration)

Information about a substream. Can be sent to the handler through a SubstreamEndpoint, and will be passed back in inject_substream or inject_outbound_closed. Read more

Auto Trait Implementations

impl<TProtoHandler> !RefUnwindSafe for NodeHandlerWrapper<TProtoHandler>

impl<TProtoHandler> Send for NodeHandlerWrapper<TProtoHandler> where
    <<TProtoHandler as ProtocolsHandler>::InboundProtocol as InboundUpgradeSend>::Future: Send,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgradeSend>::Future: Send,
    <TProtoHandler as ProtocolsHandler>::InboundOpenInfo: Send,
    <TProtoHandler as ProtocolsHandler>::InboundProtocol: InboundUpgradeSend + Send + UpgradeInfoSend,
    <<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfoSend>::Info: Send,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::Info: Send,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter: IntoIterator + Iterator + Send,
    <<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter as IntoIterator>::IntoIter: Send,
    <<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter as IntoIterator>::Item: Send,
    <TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Send,
    <TProtoHandler as ProtocolsHandler>::OutboundProtocol: OutboundUpgradeSend + Send + UpgradeInfoSend

impl<TProtoHandler> Sync for NodeHandlerWrapper<TProtoHandler> where
    TProtoHandler: Sync,
    <<TProtoHandler as ProtocolsHandler>::InboundProtocol as InboundUpgradeSend>::Future: Sync,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgradeSend>::Future: Sync,
    <TProtoHandler as ProtocolsHandler>::InboundOpenInfo: Sync,
    <TProtoHandler as ProtocolsHandler>::InboundProtocol: InboundUpgradeSend + Sync + UpgradeInfoSend,
    <<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfoSend>::Info: Sync,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::Info: Sync,
    <<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter: IntoIterator + Iterator + Sync,
    <<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter as IntoIterator>::IntoIter: Sync,
    <<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter as IntoIterator>::Item: Sync,
    <TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Sync,
    <TProtoHandler as ProtocolsHandler>::OutboundProtocol: OutboundUpgradeSend + Sync + UpgradeInfoSend

impl<TProtoHandler> Unpin for NodeHandlerWrapper<TProtoHandler> where
    TProtoHandler: Unpin,
    <TProtoHandler as ProtocolsHandler>::InboundOpenInfo: Unpin,
    <TProtoHandler as ProtocolsHandler>::InboundProtocol: InboundUpgradeSend,
    <TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Unpin,
    <TProtoHandler as ProtocolsHandler>::OutboundProtocol: OutboundUpgradeSend + Unpin

impl<TProtoHandler> !UnwindSafe for NodeHandlerWrapper<TProtoHandler>

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, TConnInfo> IntoConnectionHandler<TConnInfo> for T where
    T: ConnectionHandler
[src]

type Handler = T

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