Files
swift-collections/Sources/PersistentCollections/_NodeProtocol.swift
T
Karoy Lorentey 6f93a628e8 [PersistentDictionary] BitmapIndexedDictionaryNode → PersistentDictionary._ Node, Header → _NodeHeader
Also move Capacity, Bitmap under _NodeHeader.

Start thematically organizing _Node members.
2022-09-07 21:06:19 -07:00

30 lines
805 B
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2022 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
//
//===----------------------------------------------------------------------===//
protocol _NodeProtocol: AnyObject {
associatedtype ReturnPayload
associatedtype ReturnBitmapIndexedNode: _NodeProtocol
var hasNodes: Bool { get }
var nodeArity: Int { get }
func getNode(_ index: Int) -> Self
var hasPayload: Bool { get }
var payloadArity: Int { get }
func getPayload(_ index: Int) -> ReturnPayload
var count: Int { get }
}