by ruph123 · 3y ago · 0 comments
I will add, though, that I’ve found copilot to be very handy when it comes to generating formatting. Last week I used it while writing fmt::formatter specialisations for a library with 50 structs, some having over 20 members. Writing all of them took about 10 minutes. I dare say the same would hold for operator<< overloads.
It generates code that uses the class name and class members. In C++ we have no way of doing that (without hacky macro stuff).
Won't you face the same problem in Rust? If the library developer did not derive the Debug trait, you're out of luck.