mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-20 14:41:21 +00:00
Previously one would wrap a `ProtocolsHandler` into a `NodeHandlerWrapper` as early as possible, even though the functionality of `NodeHandlerWrapper` is only needed within `mod connection`. This commit makes `NodeHandlerWrapper` an implementation detail of `mod connection`, thus neither `mod protocols_handler`, `mod pool` nor the root level (`libp2p-swarm`) need to bother about the abstraction. In addition to the above, this commit: - Renames `NodeHandlerWrapper` to `HandlerWrapper`. The word `Node` is outdated. - Removes `NodeHandlerWrapperBuilder`. With this simplification it is no longer needed. - Folds `NodeHandlerWrapperError` into `ConnectionError`. No need for upper layers to be aware of the fact that `ProtocolHandler`s are wrapped.