[−][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 as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Error: Debug,
[src]
TProtoHandler: ProtocolsHandler,
<<TProtoHandler as ProtocolsHandler>::OutboundProtocol as OutboundUpgrade<<TProtoHandler as ProtocolsHandler>::Substream>>::Error: Debug,
type InEvent = <TProtoHandler as ProtocolsHandler>::InEvent
Custom event that can be received from the outside.
type OutEvent = <TProtoHandler as ProtocolsHandler>::OutEvent
Custom event that can be produced by the handler and that will be returned by the swarm.
type Error = NodeHandlerWrapperError<<TProtoHandler as ProtocolsHandler>::Error>
Error that can happen during the processing of the node.
type Substream = <TProtoHandler as ProtocolsHandler>::Substream
The type of the substream containing the data.
type OutboundOpenInfo = (u64, <TProtoHandler as ProtocolsHandler>::OutboundOpenInfo, Duration)
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: <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::Substream,
endpoint: NodeHandlerEndpoint<<NodeHandlerWrapper<TProtoHandler> as NodeHandler>::OutboundOpenInfo>
)
[src]
&mut self,
substream: <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::Substream,
endpoint: NodeHandlerEndpoint<<NodeHandlerWrapper<TProtoHandler> as NodeHandler>::OutboundOpenInfo>
)
fn inject_event(
&mut self,
event: <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::InEvent
)
[src]
&mut self,
event: <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::InEvent
)
fn poll(
&mut self
) -> Result<Async<NodeHandlerEvent<<NodeHandlerWrapper<TProtoHandler> as NodeHandler>::OutboundOpenInfo, <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::OutEvent>>, <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::Error>
[src]
&mut self
) -> Result<Async<NodeHandlerEvent<<NodeHandlerWrapper<TProtoHandler> as NodeHandler>::OutboundOpenInfo, <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::OutEvent>>, <NodeHandlerWrapper<TProtoHandler> as NodeHandler>::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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, TConnInfo> IntoNodeHandler<TConnInfo> for T where
T: NodeHandler,
[src]
T: NodeHandler,
impl<T> Erased for T
impl<T> Erased for T
impl<T> Typeable for T where
T: Any,
T: Any,