Files
swift-collections/Sources/PersistentCollections/_NodeProtocol.swift
T
Karoy Lorentey 8d96e3d847 [PersistentCollections] DataBufferElement → Element, ReturnPayload → Element
`Payload` wouldn’t be a bad term for this, though, and we may return to it when we start thinking about PersistentSet.
2022-09-09 00:47:10 -07:00

29 lines
737 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 Element
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) -> Element
var count: Int { get }
}