Type Aliasswift 6.0.3Swift
Iterator
- iOS
- 18.0+
- macOS
- 15.0+
- tvOS
- 18.0+
- visionOS
- 2.0+
- watchOS
- 11.0+
typealias Iterator = IndexingIterator<DiscontiguousSlice<Base>>
typealias Iterator = IndexingIterator<DiscontiguousSlice<Base>>
where Base:Collection
import Swift
struct DiscontiguousSlice<Base> where Base : Collection
A collection wrapper that provides access to the elements of a collection, indexed by a set of indices.
@frozen struct IndexingIterator<Elements> where Elements : Collection
A type that iterates over a collection using its indices.
protocol Collection<Element> : Sequence
A sequence whose elements can be traversed multiple times, nondestructively, and accessed by an indexed subscript.
var count: Int { get }
var description: String { get }
var endIndex: DiscontiguousSlice<Base>.Index { get }
var isEmpty: Bool { get }
var startIndex: DiscontiguousSlice<Base>.Index { get }
subscript(i: DiscontiguousSlice<Base>.Index) -> Base.Element { get }
subscript(bounds: Range<DiscontiguousSlice<Base>.Index>) -> DiscontiguousSlice<Base> { get }
func distance(from start: DiscontiguousSlice<Base>.Index, to end: DiscontiguousSlice<Base>.Index) -> Int
func index(after i: DiscontiguousSlice<Base>.Index) -> DiscontiguousSlice<Base>.Index
struct Index
A position in a DiscontiguousSlice
.
typealias Element = Base.Element
typealias Indices = DefaultIndices<DiscontiguousSlice<Base>>
typealias SubSequence = DiscontiguousSlice<Base>