[−][src]Struct libp2p_core::protocols_handler::NodeHandlerWrapper
Wraps around an implementation of ProtocolsHandler
, and implements NodeHandler
.
Trait Implementations
impl<TProtoHandler> NodeHandler for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: ProtocolsHandler,
<TProtoHandler::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Error: Debug,
[src]
TProtoHandler: ProtocolsHandler,
<TProtoHandler::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Error: Debug,
type InEvent = TProtoHandler::InEvent
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 by the swarm.
type Error = NodeHandlerWrapperError<TProtoHandler::Error>
Error that can happen during the processing of the node.
type Substream = TProtoHandler::Substream
The type of the substream containing the data.
type OutboundOpenInfo = (u64, TProtoHandler::OutboundOpenInfo)
Information about a substream. Can be sent to the handler through a NodeHandlerEndpoint
, and will be passed back in inject_substream
or inject_outbound_closed
. Read more
fn inject_substream(
&mut self,
substream: Self::Substream,
endpoint: NodeHandlerEndpoint<Self::OutboundOpenInfo>
)
[src]
&mut self,
substream: Self::Substream,
endpoint: NodeHandlerEndpoint<Self::OutboundOpenInfo>
)
fn inject_event(&mut self, event: Self::InEvent)
[src]
fn poll(
&mut self
) -> Poll<NodeHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>
[src]
&mut self
) -> Poll<NodeHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>
Auto Trait Implementations
impl<TProtoHandler> Send for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: Send,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Send,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Send,
<TProtoHandler as ProtocolsHandler>::InboundProtocol: Send + UpgradeInfo,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: ProtocolName + Send,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: ProtocolName + Send,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: IntoIterator,
<<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Iterator + Send,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Send,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Send + UpgradeInfo,
<TProtoHandler as ProtocolsHandler>::Substream: AsyncRead + AsyncWrite + Send,
TProtoHandler: Send,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Send,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Send,
<TProtoHandler as ProtocolsHandler>::InboundProtocol: Send + UpgradeInfo,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: ProtocolName + Send,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: ProtocolName + Send,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: IntoIterator,
<<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Iterator + Send,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Send,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Send + UpgradeInfo,
<TProtoHandler as ProtocolsHandler>::Substream: AsyncRead + AsyncWrite + Send,
impl<TProtoHandler> Sync for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: Sync,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Sync,
<TProtoHandler as ProtocolsHandler>::InboundProtocol: Sync + UpgradeInfo,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: ProtocolName + Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: ProtocolName + Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: IntoIterator,
<<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Iterator + Sync,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Sync,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Sync + UpgradeInfo,
<TProtoHandler as ProtocolsHandler>::Substream: AsyncRead + AsyncWrite + Sync,
TProtoHandler: Sync,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as InboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Future: Sync,
<TProtoHandler as ProtocolsHandler>::InboundProtocol: Sync + UpgradeInfo,
<<TProtoHandler as ProtocolsHandler>::InboundProtocol as UpgradeInfo>::Info: ProtocolName + Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::Info: ProtocolName + Sync,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter: IntoIterator,
<<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Iterator + Sync,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Sync,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Sync + UpgradeInfo,
<TProtoHandler as ProtocolsHandler>::Substream: AsyncRead + AsyncWrite + Sync,
Blanket Implementations
impl<T, TPeerId> IntoNodeHandler for T where
T: NodeHandler,
[src]
T: NodeHandler,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self