I've finally caved and am putting together a crate that provides (
RcBox types that act like
Box (i.e. have an
impl DerefMut) by being backed by a guaranteed-unique (
Rc. The intended use case is when some (mutable) initialization has to be done to a reference counted object after allocation to eliminate the
Rc conversion cost.
The question is: while an instance of
Rc is guaranteed unique, is it sound to
My intuition says yes, but I'm not perfectly certain, and even if I were certain that the current standard impl works this way, there's the question of whether this is guaranteed to always be the case.