Search Apps Documentation Source Content File Folder Download Copy Actions Download

types.gno

0.46 Kb · 31 lines
 1package btreeset
 2
 3type key interface {
 4	Less(than key) bool
 5}
 6
 7type stringKey string
 8
 9var _ key = (stringKey)("")
10
11func (s stringKey) Less(than key) bool {
12	return s < than.(stringKey)
13}
14
15type uint32Key uint32
16
17var _ key = (uint32Key)(0)
18
19func (u uint32Key) Less(than key) bool {
20	return u < than.(uint32Key)
21}
22
23type uint64Key uint64
24
25var _ key = (uint64Key)(0)
26
27func (u uint64Key) Less(than key) bool {
28	return u < than.(uint64Key)
29}
30
31type iterCbFn func(key key) bool