Struct libp2p::swarm::protocols_handler::NodeHandlerWrapper [−][src]
Wraps around an implementation of ProtocolsHandler
, and implements NodeHandler
.
Trait Implementations
impl<TProtoHandler> ConnectionHandler for NodeHandlerWrapper<TProtoHandler> where
TProtoHandler: ProtocolsHandler,
[src]
TProtoHandler: ProtocolsHandler,
type InEvent = <TProtoHandler as ProtocolsHandler>::InEvent
The inbound type of events used to notify the handler through the Network
. Read more
type OutEvent = <TProtoHandler as ProtocolsHandler>::OutEvent
The outbound type of events that the handler emits to the Network
through ConnectionHandler::poll
. Read more
type Error = NodeHandlerWrapperError<<TProtoHandler as ProtocolsHandler>::Error>
The type of errors that the handler can produce when polled by the Network
.
type Substream = SubstreamRef<Arc<StreamMuxerBox>>
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 SubstreamEndpoint
,
and will be passed back in inject_substream
or inject_outbound_closed
. Read more
pub fn inject_substream(
&mut self,
substream: <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::Substream,
endpoint: SubstreamEndpoint<<NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::OutboundOpenInfo>
)
[src]
&mut self,
substream: <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::Substream,
endpoint: SubstreamEndpoint<<NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::OutboundOpenInfo>
)
pub fn inject_event(
&mut self,
event: <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::InEvent
)
[src]
&mut self,
event: <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::InEvent
)
pub fn inject_address_change(&mut self, new_address: &Multiaddr)
[src]
pub fn poll(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<ConnectionHandlerEvent<<NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::OutboundOpenInfo, <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::OutEvent>, <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::Error>>
[src]
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<ConnectionHandlerEvent<<NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::OutboundOpenInfo, <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::OutEvent>, <NodeHandlerWrapper<TProtoHandler> as ConnectionHandler>::Error>>
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,
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>::InboundOpenInfo: Unpin,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Unpin,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Unpin,
TProtoHandler: Unpin,
<TProtoHandler as ProtocolsHandler>::InboundOpenInfo: Unpin,
<TProtoHandler as ProtocolsHandler>::OutboundOpenInfo: Unpin,
<TProtoHandler as ProtocolsHandler>::OutboundProtocol: Unpin,
impl<TProtoHandler> !UnwindSafe for NodeHandlerWrapper<TProtoHandler>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, TConnInfo> IntoConnectionHandler<TConnInfo> for T where
T: ConnectionHandler,
[src]
T: ConnectionHandler,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,