Re:Copying data is wasteful, mutating data is dangerous
by tene on Thursday January 09, 2020 @07:59PM
(#22007569)
You may be interested in the `im` crate for Rust, which implements efficient copy-on-write structural sharing, falling back to in-place mutation when there are no other outstanding references.
https://docs.rs/im/14.1.0/im/