<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/ConvertibleFromBytes",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:s20ConvertibleFromBytesP"
  },
  "title" : "ConvertibleFromBytes"
}
-->

# ConvertibleFromBytes

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

```
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.

## Relationships

### Conforming Types

[`UInt128`](/documentation/Swift/UInt128)

[`Int128`](/documentation/Swift/Int128)

[`PartialRangeUpTo`](/documentation/Swift/PartialRangeUpTo)

[`SIMD4`](/documentation/Swift/SIMD4)

[`Iterator`](/documentation/Swift/PartialRangeFrom/Iterator)

[`Double`](/documentation/Swift/Double)

[`UInt`](/documentation/Swift/UInt)

[`Int`](/documentation/Swift/Int)

[`SIMD32`](/documentation/Swift/SIMD32)

[`InlineArray`](/documentation/Swift/InlineArray)

[`Int64`](/documentation/Swift/Int64)

[`UInt32`](/documentation/Swift/UInt32)

[`Int32`](/documentation/Swift/Int32)

[`SIMD64`](/documentation/Swift/SIMD64)

[`UInt16`](/documentation/Swift/UInt16)

[`UInt64`](/documentation/Swift/UInt64)

[`UInt8`](/documentation/Swift/UInt8)

[`Int8`](/documentation/Swift/Int8)

[`PartialRangeThrough`](/documentation/Swift/PartialRangeThrough)

[`Float80`](/documentation/Swift/Float80)

[`Duration`](/documentation/Swift/Duration)

[`Float16`](/documentation/Swift/Float16)

[`PartialRangeFrom`](/documentation/Swift/PartialRangeFrom)

[`SIMD3`](/documentation/Swift/SIMD3)

[`CollectionOfOne`](/documentation/Swift/CollectionOfOne)

[`Float`](/documentation/Swift/Float)

[`SIMD8`](/documentation/Swift/SIMD8)

[`SIMD2`](/documentation/Swift/SIMD2)

[`SIMD16`](/documentation/Swift/SIMD16)

[`Int16`](/documentation/Swift/Int16)

### Inherits From

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)