3 ms·
Rust has "interior" mutability, meaning that shared references are not true 'read only' references; they can be used for writing if the type supports such an op
by zozbot234 7y ago
Rust has "interior" mutability, meaning that shared references are not true 'read only' references; they can be used for writing if the type supports such an operation. What makes Rust data-race free is the combination of 'interior' mutability and the Send and Sync traits, which control moving or referencing objects across threads.