CollectionWrapping
public protocol CollectionWrapping : Collection
CollectionWrapping
is a type-erasing protocol that allows a Collection
-conforming
structure to wrap any underlying Collection
implementation.
As a result, all of the Collection
boilerplate is done for free.
-
Wrapped
Collection
-conforming type.Declaration
Swift
associatedtype Base : Collection
-
Wrapped
Collection
-conforming type.Declaration
Swift
var base: Base { get }
-
startIndex
Extension methodStart index.
Declaration
Swift
public var startIndex: Base.Index { get }
-
endIndex
Extension methodEnd index.
Declaration
Swift
public var endIndex: Base.Index { get }
-
index(after:
Extension method) -
subscript(_:
Extension method)