Rust Design Patterns as a Book
In section 2.10, "Privacy for extensibility", are there any pros and cons to this approach over using the #[non_exhaustive] attribute? The latter works on both enums and structs, and doesn't require extra fields to be included.<p><a href="https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute" rel="nofollow">https://doc.rust-lang.org/reference/attributes/type_system.h...</a>