Introduction
In this lab, we explore mutability in Rust by examining the concept of borrowing data through mutable and immutable references using the example of a book struct with functions that demonstrate the behavior of mutable and immutable borrowing.
Note: If the lab does not specify a file name, you can use any file name you want. For example, you can use
main.rs
, compile and run it withrustc main.rs && ./main
.