Something like `unsafelyInitializedBytes<T>(as _: T.Type)` -> T

You may also be interested in the thread Best practice for parsing heterogeneous types from Data (in Swift 5).

1 Like