-
Notifications
You must be signed in to change notification settings - Fork 533
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
Implement 'Eq' trait for proto #30
Comments
The list of traits currently implemented automatically are As a workaround in the meantime, you can manually implement pub mod messages {
include!(concat!(env!("OUT_DIR"), "/messages.rs"));
}
impl Eq for messages::MyMessageType {} As far as other traits, such as SerDe's Encodable/Decodable, |
|
It would be really nice if it were possible to add serde annotations at generation time. For various reasons it's not sustainable for my team to manually add them to generated protobuf files, but we very much need to be able to convert protobuf to json (we don't much care about round tripping it though). |
@megmacattack any interest in contributing this? Should be pretty straightforward, it should probably be configurable per path (like the |
Is there a way to specify custom trait implementations, such as
Eq
, in the proto file for prost-build to generate?If not, what is the correct way to implement a trait for the generated Rust code?
Thanks!
The text was updated successfully, but these errors were encountered: