Hacker News new | ask | show | jobs
by michalhosna 1999 days ago
Using private fields you can more precisely control the “private scope”. #[non_exhaustive] is “crate scoped”, it does not apply limits for use in the same crate.

Private fields are by default module scoped, and can be tweaked. So you can limit the use even in the same crate.