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::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
fn inject_substream(
&mut self,
substream: Self::Substream,
endpoint: SubstreamEndpoint<Self::OutboundOpenInfo>
)
[src]
&mut self,
substream: Self::Substream,
endpoint: SubstreamEndpoint<Self::OutboundOpenInfo>
)
fn inject_event(&mut self, event: Self::InEvent)
[src]
fn inject_address_change(&mut self, new_address: &Multiaddr)
[src]
fn poll(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::Error>>
[src]
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<ConnectionHandlerEvent<Self::OutboundOpenInfo, Self::OutEvent>, Self::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>,