4 ms·
I cannot understand your question about "ownership policies". Rust have only one ownership policy: one owner per object. It's possible to use pointers to circu
by drran 5y ago
I cannot understand your question about "ownership policies". Rust have only one ownership policy: one owner per object.
It's possible to use pointers to circumvent the restriction and then control when object is destructed using ManuallyDrop[0], so burden of memory bookkeeping will be shifted from Rust compiler to the programmer.
[0]: https://doc.rust-lang.org/core/mem/struct.ManuallyDrop.html https://doc.rust-lang.org/core/mem/struct.ManuallyDrop.html