pub unsafe fn type_bytes(metadata: *const c_void) -> usizeExpand description
How many bytes to allocate for a value of this type.
Always the larger of size and stride, and never zero. Sizing a buffer by
size alone is a trap: a callee may write the type’s trailing padding, which
overruns the allocation. The damage is silent — it corrupts the heap and
surfaces much later as an allocator abort in an unrelated call.
§Safety
As type_size.