Contents

update(from:)

Updates the buffer’s initialized memory with the given elements.

Declaration

func update<S>(from source: S) -> (unwritten: S.Iterator, index: UnsafeMutableBufferPointer<Element>.Index) where Element == S.Element, S : Sequence

Parameters

  • source:

    A sequence of elements to be used to update the buffer’s contents.

Return Value

An iterator to any elements of source that didn’t fit in the buffer, and the index one past the last updated element in the buffer.

Discussion

The buffer’s memory must be initialized or its Element type must be a trivial type.