Files
swift-collections/Sources/PersistentCollections/_DictionaryNode.swift
T
Michael Steindorfer 26b97f95d2 [Capsule] Unify insertion/deletion methods
Note, always tracking discardable result negatively impacts batch
use cases.
2022-09-06 16:11:17 +02:00

26 lines
1.1 KiB
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift Collections open source project
//
// Copyright (c) 2019 - 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 DictionaryNode: Node {
associatedtype Key: Hashable
associatedtype Value
func get(_ key: Key, _ hash: Int, _ shift: Int) -> Value?
func containsKey(_ key: Key, _ hash: Int, _ shift: Int) -> Bool
func index(_ key: Key, _ hash: Int, _ shift: Int, _ skippedBefore: Int) -> PersistentDictionaryIndex?
func updateOrUpdating(_ isStorageKnownUniquelyReferenced: Bool, _ key: Key, _ value: Value, _ hash: Int, _ shift: Int, _ effect: inout DictionaryEffect<Value>) -> ReturnBitmapIndexedNode
func removeOrRemoving(_ isStorageKnownUniquelyReferenced: Bool, _ key: Key, _ hash: Int, _ shift: Int, _ effect: inout DictionaryEffect<Value>) -> ReturnBitmapIndexedNode
}