Required Associated Typeswift 6.0.1Swift
Index
associatedtype Index
Restates
associatedtype Index
A type that represents a position in the collection.
Other requirements
Type members
Instance members
subscript(Range<Self.Index>
) -> Self.SubSequence Accesses a contiguous subrange of the collection’s elements.
subscript(Self.Index
) -> Self.Element Accesses the element at the specified position.
func partition(by: (Self.Element) throws -> Bool
) rethrows -> Self.Index Reorders the elements of the collection such that all the elements that match the given predicate are after all the elements that don’t match.
func swapAt(Self.Index, Self.Index
) Exchanges the values at the specified indices of the collection.
func withContiguousMutableStorageIfAvailable<R>((inout UnsafeMutableBufferPointer<Self.Element>) throws -> R
) rethrows -> R? Executes a closure on the collection’s contiguous storage.