ConvertibleToBytes
A protocol for types whose memory can safely be read as individual raw bytes.
Declaration
protocol ConvertibleToBytesOverview
A type can conform to ConvertibleToBytes if its memory representation includes no padding. The sum of the size of its stored properties must be equal to its stride.
A type that conforms to ConvertibleToBytes must have:
one or more stored properties,
all of its stored properties have a type which conforms to
ConvertibleToBytes,its stored properties are stored contiguously in memory, with no padding,
none of its values disregards a subset of its bytes, making most enums ineligible.