hamt

package
v0.0.0-...-4092c3d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher[K comparable] interface {
	Hash(key K) uint64

	// Rehash is used to rehash the key when the key is already hashed for the given level
	Rehash(key K, prevHashCount int) uint64
}

type PersistentHAMT

type PersistentHAMT[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewPersistentHAMT

func NewPersistentHAMT[K comparable, V any](h Hasher[K]) *PersistentHAMT[K, V]

func (*PersistentHAMT[K, V]) Clear

func (m *PersistentHAMT[K, V]) Clear()

func (*PersistentHAMT[K, V]) Clone

func (m *PersistentHAMT[K, V]) Clone() *PersistentHAMT[K, V]

func (*PersistentHAMT[K, V]) Delete

func (m *PersistentHAMT[K, V]) Delete(k K) bool

func (*PersistentHAMT[K, V]) Destroy

func (m *PersistentHAMT[K, V]) Destroy()

func (*PersistentHAMT[K, V]) Get

func (m *PersistentHAMT[K, V]) Get(k K) (_ V, _ bool)

func (*PersistentHAMT[K, V]) Len

func (m *PersistentHAMT[K, V]) Len() int

func (*PersistentHAMT[K, V]) Put

func (m *PersistentHAMT[K, V]) Put(k K, v V, release func(key K, value V))

func (*PersistentHAMT[K, V]) Range

func (m *PersistentHAMT[K, V]) Range(f func(k K, v V) bool)

func (*PersistentHAMT[K, V]) Set

func (m *PersistentHAMT[K, V]) Set(k K, v V)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL