typically, this is done with a Option, because Option<T> implements Default, you can use Cell::take() and Cell::set(). it is safe, though Option<T> does have a tiny bit of overhead.
if you really concerns about overhead, the unsafe way is to go through raw pointer. use std::ptr::read() to emulate "move" out the value, and use std::ptr::write() to overwrite the old value. you may want to play with MaybeUninit or UnsafeCell to get the exact behavior you wanted.
just be warned, it is HIGHLY UNSAFE because you can quite easily write unsound code this way!
Yeah, I was unsure whether Miri would even allow something like this since "technically" the data is owned in two places at once, even if it's just for a short period of time