init(buffer:)
Creates a data buffer with copied memory content using a buffer pointer.
Declaration
init<SourceType>(buffer: UnsafeBufferPointer<SourceType>)Parameters
- buffer:
A buffer pointer to copy. The size is calculated from
SourceTypeandbuffer.count.