storeBytes(of:toByteOffset:as:)
Stores the given value’s bytes to the specified offset into the span’s memory.
Declaration
mutating func storeBytes<T>(of value: T, toByteOffset offset: Int, as type: T.Type) where T : BitwiseCopyable, T : ConvertibleToBytesParameters
- value:
The value to store as raw bytes.
- offset:
The offset in bytes into the span’s memory at which to begin writing the bytes from the value.
- type:
The type of the instance to store.
Discussion
The range of bytes required to store a value of type T starting at byte offset offset must be completely within the span.