Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Closed-world ("sealed") traits. Rust's rules against private types in the public API are good civilization but they make it difficult to define pseudo-private traits like Mount that I want users to name but not implement or call into.

What about a public type with no public fields nor public methods? Doesn't that accomplish exactly what the author is looking for?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: