Borrowing

Noun · Development

Definitions

  1. In Rust's ownership system, temporarily accessing data owned by another variable without taking ownership — via immutable (&T) or mutable (&mut T) references — enforced at compile time to prevent data races and dangling pointers.

    In plain English: Rust's way of letting you look at or change someone else's data temporarily, with strict rules that prevent two parts of the code from conflicting.

    Example: "You can have as many immutable borrows as you want, but only one mutable borrow at a time."

Related Terms