3 ms·
Ok, just to summarize: foo(some_struct) == memcpy() for both copy and move. foo(&some_struct) == copy usize ref/pointer value onto stack So, mostly the same
by markus2012 11y ago
Ok, just to summarize:
foo(some_struct) == memcpy() for both copy and move.
foo(&some_struct) == copy usize ref/pointer value onto stack
So, mostly the same as C++. The exception is that Rust can use a ref under the hood for foo(some_struct) if it wants.