stepancheg / grpc-rust

Rust implementation of gRPC
MIT License
1.37k stars 124 forks source link

Derive or implement Debug for the generated structs #144

Open drozdziak1 opened 5 years ago

drozdziak1 commented 5 years ago

So far, I love this crate! But it's pretty unintuitive how printing the generated structs with {:?} formatting doesn't do anything at all (no compile-time error, just nothing where a string representation should be).

drozdziak1 commented 5 years ago

I misunderstood how it works, sorry. Ommitting stuff with default values is hella unintuitive though!

ghost commented 5 years ago

As far as I understand, protobuf/grpc 3 does not differentiate between "left out" and "default" values anymore, it is an implementation detail. That way, applications do not have to check for null all the time, giving us more static type safety. So it would make sense to always display all values.

stepancheg commented 5 years ago

generated structs

Are you talking about generated Client/Service objects or generated Req/Resp objects?