Skip to content

Glossary: Rust Basics

Immutable

Also written: mutable, mut, immutability

An immutable variable can't be changed after it's set, which is Rust's default; a mutable one, declared with `mut`, can. The default means you know a value from one line of code.

Where the book teaches it

Related terms

VariableMutable reference