Generic Instance Method

withUnsafeMutableBytes(_:)

Mutates the raw bytes in the data's buffer.

Declaration

mutating func withUnsafeMutableBytes<ResultType, ContentType>(_ body: (UnsafeMutablePointer<ContentType>) throws -> ResultType) rethrows -> ResultType

Discussion

This function assumes that you are mutating the contents.

See Also

Accessing Underlying Memory

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software