Skip to content
ratranqu edited this page Apr 26, 2021 · 2 revisions

MTree

public protocol MTree 

Requirements

has(key:​)

func has(key: Data) throws -> Bool

get(key:​)

func get(key: Data) -> (index: Int64, value: Data?)

set(key:​value:​)

@discardableResult
    func set(key: Data, value: Data) throws -> Bool

remove(key:​)

@discardableResult
    func remove(key: Data) -> (Data?, Bool)

deleteVersion(version:​)

func deleteVersion(version: Int64) throws

deleteVersions(versions:​)

func deleteVersions(versions: [Int64]) throws

version

var version: Int64 

hash

var hash: Data 

versionExists(version:​)

func versionExists(version: Int64) -> Bool

getVersioned(key:​version:​)

func getVersioned(key: Data, version: Int64) throws -> (index: Int64, value: Data?)

getVersionedWithProof(_:​_:​)

func getVersionedWithProof(_ key: Data, _ version: Int64) throws -> (Data?, RangeProof<Node>)

getImmutable(version:​)

func getImmutable(version: Int64) throws -> ImmutableTree
Types
Protocols
Global Typealiases
Global Variables
Global Functions
Extensions
Clone this wiki locally