DeclIDs
public struct DeclIDs : Sendable
extension DeclIDs: Equatable
extension DeclIDs: RandomAccessCollection
A collection of declaration identifiers.
-
Instances are notionally the concatenation of two collections
frontandbacksuch thatfrontonly contains type extending declarations andbackcontains none.insert(_:)maintains this invariant as well as the relative order of the elements in these collections. All identifiers inself.Declaration
Swift
private(set) var all: [AnyDeclID] { get } -
The position immediately after the last ID of a type extending declaration in
all.Declaration
Swift
private var extensionEndIndex: Int -
Creates an empty instance.
Declaration
Swift
public init() -
Creates an instance with the contents of each collection in
batch.Declaration
Swift
public init<S>(formingUnionOf batch: S) where S : Sequence, S.Element == DeclIDs -
The identifiers in
selfdenoting type extending declarations.Declaration
Swift
public var extensions: ArraySlice<AnyDeclID> { get } -
The identifiers in
selfnot denoting type extending declarations.Declaration
Swift
public var withoutExtensions: ArraySlice<AnyDeclID> { get } -
Inserts
dinself.Declaration
Swift
public mutating func insert(_ d: AnyDeclID) -
Declaration
Swift
public typealias Index = Int -
Declaration
Swift
public typealias Element = AnyDeclID -
Declaration
Swift
public var startIndex: Int { get } -
Declaration
Swift
public var endIndex: Int { get } -
Declaration
Swift
public func index(after position: Int) -> Int -
Declaration
Swift
public func index(before position: Int) -> Int -
Declaration
Swift
public func index(_ position: Int, offsetBy distance: Int) -> Int -
Declaration
Swift
public subscript(position: Int) -> AnyDeclID { get }
View on GitHub