Struct libp2p_swarm::protocols_handler::NodeHandlerWrapper [−][src]
pub struct NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: ProtocolsHandler, { /* fields omitted */ }Expand description
Wraps around an implementation of ProtocolsHandler, and implements NodeHandler.
Trait Implementations
impl<TProtoHandler> ConnectionHandler for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: ProtocolsHandler,
impl<TProtoHandler> ConnectionHandler for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: ProtocolsHandler, The inbound type of events used to notify the handler through the Network. Read more
The outbound type of events that the handler emits to the Network
through ConnectionHandler::poll. Read more
type Error = NodeHandlerWrapperError<TProtoHandler::Error>
type Error = NodeHandlerWrapperError<TProtoHandler::Error>The type of errors that the handler can produce when polled by the Network.
type Substream = Substream<StreamMuxerBox>
type Substream = Substream<StreamMuxerBox>The type of the substream containing the data.
type OutboundOpenInfo = (u64, TProtoHandler::OutboundOpenInfo, Duration)
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
fn inject_substream(
&mut self,
substream: Self::Substream,
endpoint: SubstreamEndpoint<Self::OutboundOpenInfo>
)
fn inject_substream(
&mut self,
substream: Self::Substream,
endpoint: SubstreamEndpoint<Self::OutboundOpenInfo>
)Sends a new substream to the handler. Read more
Notifies the handler of an event.
Notifies the handler of a change in the address of the remote.
fn poll(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>>
fn poll(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>>Polls the handler for events. Read more
Auto Trait Implementations
impl<TProtoHandler> !RefUnwindSafe for NodeHandlerWrapper<TProtoHandler>impl<TProtoHandler> Send for NodeHandlerWrapper<TProtoHandler>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: Sync,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfoSend>::Info: Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::Info: Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfoSend>::InfoIter: Sync,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Sync,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Sync, impl<TProtoHandler> Unpin for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: Unpin,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Unpin, impl<TProtoHandler> !UnwindSafe for NodeHandlerWrapper<TProtoHandler>