-
Notifications
You must be signed in to change notification settings - Fork 999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add protocols_handler::multi
module.
#1497
Conversation
An implementation of `ProtocolsHandler` that contains multiple other `ProtocolsHandler`s indexed by some key type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what my review is worth, this looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to provide an implementation of IntoProtocolsHandler
.
My understanding was that there is a blanket impl of |
All To rephrase: the "protocols handler" thing is really two steps (the "into", then the actual handler), and for convenience we allow short-circuiting the first step. But in that PR you make it mandatory to short-circuit the first step, which is not great for something generic. |
- No more `Debug` bound for the key type and more generic log messages. - Additional comments. - Imports instead of fully-qualified use. - Renamed `DuplicateProtoname` to `DuplicateProtonameError`.
This reverts commit 0d3e4f2
An implementation of
ProtocolsHandler
that contains multiple otherProtocolsHandler
s indexed by some key type.Factored out from paritytech/substrate#5045.