You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use a variety of styles to refer to and alias protobuf message types.
This comes up within the proto crate itself, where we have mappings from the domain type T and the generated protobuf type T. In particular when implementing conversions to and from these types.
In the long run we hope to refactor the proto crate to have less clutter, but until then we should at least be consistent in how we refer to these types.
A quick and dirty option is to go through all instances referring to the proto types and make them consistent e.g. have them look like proto::T so that a conversion function is
implFrom<BlockHeader>for proto::BlockHeader{...}
Another more thorough option is to re-organize the proto crate so that all domain types are exported at the root level, and all protobuf messages are in a module e.g. raw.
This would be a breaking change though, but maybe its not so bad :)
We currently use a variety of styles to refer to and alias protobuf message types.
This comes up within the proto crate itself, where we have mappings from the domain type
T
and the generated protobuf typeT
. In particular when implementing conversions to and from these types.In the long run we hope to refactor the proto crate to have less clutter, but until then we should at least be consistent in how we refer to these types.
A quick and dirty option is to go through all instances referring to the proto types and make them consistent e.g. have them look like
proto::T
so that a conversion function isAnother more thorough option is to re-organize the proto crate so that all domain types are exported at the root level, and all protobuf messages are in a module e.g.
raw
.This would be a breaking change though, but maybe its not so bad :)
See here for example.
The text was updated successfully, but these errors were encountered: