Interior mutability lets a Rust type appear immutable while its internal state changes. An Rc<T> or Arc<T>, for example, changes its reference count as references are made and expire, even though it presents an immutable façade. section 3.4.1
This helps when an interface accepts an immutable value but the value still needs to change. Cell<T> can wrap an owned value; RefCell<T> can wrap a value accessed through references. These options add runtime cost. section 6.2.2
Combining shared ownership and interior mutability
A type such as Rc<RefCell<T>> combines reference-counted shared ownership with interior mutability. It offers more flexibility, but the two mechanisms each carry a runtime cost. section 6.2.2
The distinction also explains why let and const are not interchangeable: data behind a let binding can change. Ordinary borrowing still matters—read-only borrows can alias, while a read-write borrow must not alias other access. section 3.4.1 section 4.6


