Instance Methodswift 6.0.3Swift

update(from:)

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

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.

Returns

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.

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