|
|
|
|
|
by masklinn
2445 days ago
|
|
Rust doesn't have copy constructors per-se (it really doesn't have ctors in he C++ sense). Copy is a "marker trait", its operation can not be overridden and is always (semantically) a simple memcpy. The truth is that Copy is not a thing at runtime, it's only a compile-time restriction (when not present). Clone would be what comes closest to copy constructors, and it has to be explicitly invoked. |
|