What is this pattern of embedding a private unit member in pub structs about? I vaugely recall this had to do with API stability but is that still relevant with the non_exhaistive attribute that stabilized in 1.40?https://blog.rust-lang.org/2019/12/19/Rust-1.40.0.html …
-
-
-
Yes, it's for stability. By not exposing publicly the layout, you can add new fields without breaking users who were constructing it without a function. I haven't toyed with non_exhaustive, since it's so new!
- 1 more reply
New conversation -
-
-
If you are fine with serde as a dependency there is `SerDebug` which allows you to derive Debug with the power of serde.
-
I would choose native customization over that any day though.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.