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 }
-
startIndexExtension methodStart index.
Declaration
Swift
public var startIndex: Base.Index { get } -
endIndexExtension methodEnd index.
Declaration
Swift
public var endIndex: Base.Index { get } -
index(after:Extension method) -
subscript(_:Extension method)
View on GitHub
Install in Dash
CollectionWrapping Protocol Reference