Skip to content

Glossary: Data Structures and Algorithms in Rust

Borrow

Also written: borrowed, borrows, &mut, &self, &mut self

Using a value through a reference without taking ownership of it. A plain & borrow only reads, while &mut lets the code change the value.

Where the book teaches it

Related terms

OwnershipSlice