Contents

storeBytes(of:toUncheckedByteOffset:as:)

Stores the given value’s bytes into the span’s raw memory at the specified byte offset.

Declaration

mutating func storeBytes<T>(of value: T, toUncheckedByteOffset offset: Int, as type: T.Type) where T : BitwiseCopyable

Parameters

  • value:

    The value to store as raw bytes.

  • offset:

    The offset from the start of the span, in bytes. offset must be nonnegative.

  • type:

    The type of value.

Discussion

This function does not validate offset; this is an unsafe operation.