moveElement(from:)
Retrieves and returns the element at index, leaving that element’s underlying memory uninitialized.
Declaration
func moveElement<Element>(from index: Slice<Base>.Index) -> Element where Base == UnsafeMutableBufferPointer<Element>Parameters
- index:
The index of the buffer element to retrieve and deinitialize.
Return Value
The instance referenced by this index in this buffer.
Discussion
The memory underlying the element at index must be initialized. After calling moveElement(from:), the memory underlying this element of the buffer slice is uninitialized, and still bound to type Element.