UnsafeMutableRawPointer

extension UnsafeMutableRawPointer
  • Stores a trivial type into raw memory at the specified offset.

    The type T to be stored must be a trivial type. The memory must be uninitialized, initialized to T,
    or initialized to another trivial type that is layout compatible with T.
    

    Declaration

    Swift

    public func unalignedStoreBytes<T>(of value: T, toByteOffset offset: Int, as type: T.Type)

    Parameters

    value

    The value to store as raw bytes.

    offset

    The offset from this pointer, in bytes. The default is zero.

    type

    The type of value.