3 ms·
> why not show the full bit pattern in memory? Rust doesn't guarantee a particular memory layout except for types explicitly requesting that you get a specific
by steveklabnik 2y ago
> why not show the full bit pattern in memory?
Rust doesn't guarantee a particular memory layout except for types explicitly requesting that you get a specific representation, so showing this would at least require a caveat that it's not guaranteed to be accurate.
Furthermore, this specific data structure's internals are generic, so to show the memory layout, it would have to be for a specific instantiation.
(They do also provide a structure that includes instantiations between u8 and u256, mentioning in a doc comment that the 256 size dominates overall size, and so if you want to slim it down, use the internals directly.)