Rust Ownership 4: References and Borrowing
In part 3 of this series, we learned what Ownership in Rust means and some of the ways ownership of a value can be transferred (moved). We also learned about the Borrow-Checker and how it prevents us from illegally accessing data in Rust. We also came to the conclusion that it would be tedious if we could never use a variable again after passing it into a function (because ownership has been moved), and I said that Rust allows us to borrow values rather than take up their ownership. ...