What is a safe operation on a std::cell:UnsafeCell<T>?
std::cell:UnsafeCell<T>
Non. UnsafeCell<T> only allows code that would otherwise need unsafe blocks to be written in safe code.
UnsafeCell<T>
A &mut T reference is allowed. However it may not cpexists with any other references. and may be created only in single-threaded code.
&mut T
UnsafeCell<T> provides thread-safety. Therefore, creating &T references from multiple threads is safe.
&T
The only safe operation is the .get() method, which returns only a raw pointer.
.get()