Could collections hypothetically store keys and values inline?
Rust Internals [Unofficial]
April 24, 2026
robofinch:
Or is there some reason I'm missing that already prevents
std::collectionsdata structures from storing values and (if applicable) keys inline, even hypothetically? In other words, canunsafecode stably and soundly use e.g. aHashMapas backing data for self-references to keys and values?
That's a libs-api question, not a UCG question (so you put this in the wrong section of this forum). And the answer is no, you can't rely on anything that's not explicitly documented.
Discussion in the ATmosphere