c.register(move |val| {
// In here, all we have is a shared reference of our environment. But that's good enough for the `get` and `set` of the cell!
//@ At run-time, the `Cell` will be almost entirely compiled away, so this becomes pretty much equivalent to the version
c.register(move |val| {
// In here, all we have is a shared reference of our environment. But that's good enough for the `get` and `set` of the cell!
//@ At run-time, the `Cell` will be almost entirely compiled away, so this becomes pretty much equivalent to the version
//@ Putting it all together, the story around mutation and ownership through references looks as follows: There are *unique* references,
//@ which - because of their exclusivity - are always safe to mutate through. And there are *shared* references, where the compiler cannot
//@ generally promise that mutation is safe. However, if extra circumstances guarantee that mutation *is* safe, then it can happen even
//@ Putting it all together, the story around mutation and ownership through references looks as follows: There are *unique* references,
//@ which - because of their exclusivity - are always safe to mutate through. And there are *shared* references, where the compiler cannot
//@ generally promise that mutation is safe. However, if extra circumstances guarantee that mutation *is* safe, then it can happen even
// ## `RefCell`
//@ As the next step in the evolution of `Callbacks`, we could try to solve this problem of mutability once and for all, by adding `Cell`
// ## `RefCell`
//@ As the next step in the evolution of `Callbacks`, we could try to solve this problem of mutability once and for all, by adding `Cell`
// **Exercise 12.1**: Write some piece of code using only the available, public interface of `CallbacksMut` such that a reentrant call to a closure
// is happening, and the program panics because the `RefCell` refuses to hand out a second mutable borrow of the closure's environment.
// **Exercise 12.1**: Write some piece of code using only the available, public interface of `CallbacksMut` such that a reentrant call to a closure
// is happening, and the program panics because the `RefCell` refuses to hand out a second mutable borrow of the closure's environment.