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.
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.