An explanation of Rust pointers, assuming familiarity with C or Go, but seeking the Rust way of thinking.


The Core Concept: The Address vs. The Rules

In C or Go, a pointer is like a scrap of paper with a house address on it.

In Rust, a pointer is still a memory address, but it comes attached to a legal contract.

Rust doesn't just care where the data is; it cares who is allowed to touch it and for how long.


1. References: &T and &mut T

These are the most common "pointers" in Rust. They are purely for Borrowing.

The Rust Twist (The Rules)

House Analogy

&T — Read-Only Keycard: