Structure
IndexedCollection
public struct IndexedCollection<Base: RandomAccessCollection>: RandomAccessCollection
Helper for being able to address a `` with a .indexed
method.
See: https://stackoverflow.com/a/57842608/8859365
Relationships
Conforms To
RandomAccessCollection
Nested Type Aliases
Index
public typealias Index = Base.Index
Element
public typealias Element = (index: Index, element: Base.Element)
Properties
base
public let base: Base
startIndex
public var startIndex: Index
endIndex
public var endIndex: Index
Methods
index(after:)
public func index(after i: Index) -> Index
index(before:)
public func index(before i: Index) -> Index
index(_:offsetBy:)
public func index(_ i: Index, offsetBy distance: Int) -> Index