October 2018
Beginner
180 pages
4h 48m
English
We cannot use the mut keyword to make the contained values within a structure mutable, and leaving the keyword off does not make them immutable. Instead, the entire structure is mutable or immutable on a case-by-case basis. See the following, for example:
let change_no: Constrained;let mut change_yes: Constrained;
The preceding code means that there are two variables, both with Constrained as their data type, but the value stored in change_no is immutable while the value stored in change_yes is mutable.
Read now
Unlock full access