Rust References and Borrowing
A Rust reference borrows a value without taking ownership. The compiler allows many shared references &T or a single mutable reference &mut T at a time, rejecting code that changes a borrowed value, and it also rejects references that would outlive their owner, all at compile time. The third post in a Rust study series.