Rust works this way, yes. There are escape hatches though, which allow interior mutability.
Yeah, here's an example: https://play.rust-lang.org/?version=stable&mode=debug&editio...
Yeah, here's an example: https://play.rust-lang.org/?version=stable&mode=debug&editio...