Re:My least favorite Rust type
by svnpenn on Monday September 21, 2020 @11:45PM
(#24550629)
In Go, you can use an interface to implement private struct fields. Then you can make a "New" function to implement default values as needed. I made a post about this last month:
https://stackoverflow.com/a/63552596