Default immutability is a language rule requiring explicit declaration before a variable can be mutated.
Default immutability makes every variable immutable unless its declaration explicitly permits mutation. This forces deliberate decisions about where data changes and how long each object remains relevant. section 1.2.2
Default immutability contributes to Rust’s safety model by:
Making mutation visible in declarations rather than implicit. section 1.2.2
Working alongside ownership to clarify management of resources such as sockets, database handles, and file handles. section 1.2.2
Supporting compiler-enforced safety together with static typing, borrowing, and exhaustive pattern matching. section 1.2.2
How Rust Servers, Services, and Apps covers it
How deep it goes
Explains the rule and its design rationale, but does not provide mutation syntax or an implementation walkthrough.
What you can do after
Evaluate variable declarations by identifying where mutation must be made explicit.
How it connects
Connects default immutability to ownership, borrowing, static typing, thread safety, and data races.
This explainer was generated by Manning's knowledge graph from the text of Rust Servers, Services, and Apps. The section links point to the parts of the book it draws on.