I'm storing some data in a
RefCell, but most of the time a compile-time checked
&mut T or
&T would be ideal.
To get a compile-time checked
&mut T, there is get_mut (which requires mutable access to the
However, I just realized, there is no
Is there a different way to get a statically checked
&T out of a
RefCell, that I don't see?
I don't have mutable access to the
RefCell where the compile-time checked
&T is needed (otherwise I could "downgrade"
&mut T to
&T, I think), and I'd like to avoid
RefCell::borrow, if possible.
If this isn't possible: Why is there a way to get a compile-time checked
&mut T, but not a compile-time checked