3 ms·
Implicit clones are enabled using the `Copy` marker trait in Rust.
by ChrisSD 6y ago
Implicit clones are enabled using the `Copy` marker trait in Rust.
- zozbot234 6y ago`Copy` implies that an object can be bitwise copied while preserving desired semantics; Rust has no exact equivalent to copy construction or move semantics in C++, which can be entirely implicit while involving custom code. (There's a 3rd-party `transfer` crate that enables a `Clone`-like marker for custom moves, however. It's used together with the Pin feature, so these moves are also explicit.)