update(from:)
Updates the buffer slice’s initialized memory with the given elements.
Declaration
func update<S>(from source: S) -> (unwritten: S.Iterator, index: Slice<Base>.Index) where Base == UnsafeMutableBufferPointer<S.Element>, S : SequenceParameters
- source:
A sequence of elements to be used to update the contents of the buffer slice.
Return Value
An iterator to any elements of source that didn’t fit in the buffer slice, and the index one past the last updated element.
Discussion
The buffer slice’s memory must be initialized or its Element type must be a trivial type.