minus-squarelobsters__terts@crustaceanson.theshelf.topMtoLobsters - all tags@crustaceanson.theshelf.top•[plt] Intermediary between public and private memberslinkfedilinkarrow-up1·3 days agoRust might get a feature like this in the future, where they call it mut restrictions: https://blog.rust-lang.org/inside-rust/2026/08/10/call-for-testing-impl-and-mut-restrictions/ I’m very much looking forward to it especially because getters in Rust are quite annoying. You often need both an immutable and a mutable getter and the borrow checker requires the entire struct to be borrowed if you call a method on it. score 2 · canonical linkfedilink
Rust might get a feature like this in the future, where they call it mut restrictions: https://blog.rust-lang.org/inside-rust/2026/08/10/call-for-testing-impl-and-mut-restrictions/
I’m very much looking forward to it especially because getters in Rust are quite annoying. You often need both an immutable and a mutable getter and the borrow checker requires the entire struct to be borrowed if you call a method on it.
score 2 · canonical