Type Aliasswift 6.0.3Swift
SubSequence
You’re reading documentation from an older version of Swift 6.1.
A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.
typealias SubSequence = EmptyCollection<Element>You’re reading documentation from an older version of Swift 6.1.
A symbol with the same signature as this one exists in the latest stable release of Swift 6.1.
typealias SubSequence = EmptyCollection<Element>import Swift@frozen struct EmptyCollection<Element>A collection whose element type is Element but that is always empty.
init() Creates an instance.
var count: Int { get }The number of elements (always zero).
var endIndex: EmptyCollection<Element>.Index { get }Always zero, just like startIndex.
var startIndex: EmptyCollection<Element>.Index { get }Always zero, just like endIndex.
subscript(bounds: Range<EmptyCollection<Element>.Index>) -> EmptyCollection<Element>.SubSequence { get set } subscript(position: EmptyCollection<Element>.Index) -> Element { get set } Accesses the element at the given position.
static func == (lhs: EmptyCollection<Element>, rhs: EmptyCollection<Element>) -> Bool func distance(from start: EmptyCollection<Element>.Index, to end: EmptyCollection<Element>.Index) -> Int The distance between two indexes (always zero).
func index(_ i: EmptyCollection<Element>.Index, offsetBy n: Int) -> EmptyCollection<Element>.Index func index(_ i: EmptyCollection<Element>.Index, offsetBy n: Int, limitedBy limit: EmptyCollection<Element>.Index) -> EmptyCollection<Element>.Index? func index(after i: EmptyCollection<Element>.Index) -> EmptyCollection<Element>.Index Always traps.
func index(before i: EmptyCollection<Element>.Index) -> EmptyCollection<Element>.Index Always traps.
func makeIterator() -> EmptyCollection<Element>.Iterator Returns an empty iterator.
@frozen struct IteratorAn iterator that never produces an element.
typealias Index = IntA type that represents a valid position in the collection.
typealias Indices = Range<Int>