-
Notifications
You must be signed in to change notification settings - Fork 0
InMemoryNodeStorage
ratranqu edited this page Apr 7, 2021
·
2 revisions
public final class InMemoryNodeStorage<Key: Comparable & Codable & DataProtocol & InitialisableProtocol, Value: Codable & DataProtocol & InitialisableProtocol, Hasher: HasherProtocol>: NodeStorageProtocol
public typealias Key = Key
public typealias Value = Value
public typealias Hasher = Hasher
public typealias Hash = Hasher.Hash
public typealias Node = InMemoryNode<Key, Value, Hasher>
public init()
public init(_ root: Node, _ version: Int64)
var orphans: [Hash: Int64] = [:]
var version: Int64 = 0
var versions: [Int64]
var description: String
public func root(at version: Int64) throws -> InMemoryNode<Key, Value, Hasher>?
public func rollback()
@discardableResult public func set(key: Key, value: Value) throws -> Bool
@discardableResult public func remove(key: Key) -> (Value?, Bool)
public func deleteLast() throws
public func deleteAll(from: Int64) throws
public func commit() throws
public func makeEmpty() -> InMemoryNode<Key, Value, Hasher>
public func makeLeaf(key: Key, value: Value) -> Node
public func makeInner(key: Key, left: Node, right: Node) -> Node
Generated at 2021-04-20T11:34:45+0000 using swift-doc 1.0.0-beta.5.