rustprotocol-buffersprost

Rust / Prost : How do add Debug to structs & unions?


It looks like the prost protobuf generator only adds derive(Debug) to generated enum types (and only enums not inside a pub mod block). None of the generated structs, or unions have it applied. How can I get prost to add it to everything?

Using Prost version 0.9 and rustic 1.56


Solution

  • Prost does derive Debug on everything. But you need prost::Messaeg in scope or you'll get an error about missing Debug traits.