Contents

ConvertibleFromBytes

A protocol for types whose memory can safely be populated from raw bytes, resulting in a valid instance.

Declaration

protocol ConvertibleFromBytes : BitwiseCopyable

Overview

A type can conform to ConvertibleFromBytes if every bit pattern for every byte of its stored properties is valid. Note that this allows conformances for types with internal or trailing padding. A conformer to ConvertibleFromBytes must not have semantic constraints on the values of its stored properties. All its stored properties must themselves conform to ConvertibleFromBytes.

See Also

Safe Access to Raw Bytes