Is it possible to have a custom copy/move function?
⚓ Rust 📅 2026-02-19 👤 surdeus 👁️ 5If I have something similar to an ArrayVec::arrayvec, as I understand it Rust copies all the bits when it is copied or moved. I was wondering if it is possible (or if it even makes sense) to have a custom copy/move function which only copies the initialised elements when moving or copying it.
[ I am not sure this is useful, it is just something I was thinking about, perhaps in a confused way ]
4 posts - 3 participants
🏷️ Rust_feed