226 private links
Scalar types are types representing a single value. Moreover primitive types contains scalar types and some others. See: https://doc.rust-lang.org/std/index.html#primitives
Types that have the copy traits are said to have copy semantics. What this means is that when you pass them into a function, you pass a copy of that value into that function.
Non-primitive types do not have the Copy trait by default. This means they are subject to move semantics. When you pass them into a function, you move the value into that function. Without going into details (that I am still learning about myself), this pretty much means that when the function scope ends, the value is destroyed.
There are ways to deal with this, using a reference for instance.
It is the symbol &
that says take the reference