pub struct NodeHandlerWrapper<TProtoHandler>where
    TProtoHandler: ProtocolsHandler,
{ /* private fields */ }
Expand description

Wraps around an implementation of ProtocolsHandler, and implements NodeHandler.

Trait Implementations

Custom event that can be received from the outside.
Custom event that can be produced by the handler and that will be returned by the swarm.
Error that can happen during the processing of the node.
The type of the substream containing the data.
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
Sends a new substream to the handler. Read more
Indicates to the handler that the inbound part of the muxer has been closed, and that therefore no more inbound substream will be produced. Read more
Indicates to the handler that an outbound substream failed to open because the outbound part of the muxer has been closed. Read more
Injects an event coming from the outside into the handler.
Indicates to the node that it should shut down. After that, it is expected that poll() returns Ready(NodeHandlerEvent::Shutdown) as soon as possible. Read more
Should behave like Stream::poll(). Should close if no more event can be produced and the node should be closed. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.