Rust is really good that way. It would be nice to have for sure.
https://github.com/frankmcsherry/abomonation
It still needs me to opt in to declaring methods as unsafe, rather than automatically surfacing my uses of unsafe. I could definitely "trick users" by not doing that and pretending it always works (it doesn't).