Type-erasing pointers to T: ?Sized

A MaybeUninit is guaranteed to retain the value of its bytes exactly, so it can be used to roundtrip anything. Using that strategy, you could do it like this: playground.

4 Likes