type Set
structMethods on Set
func Add
method on SetAdd inserts an address into the set. Returns true if the address was newly added, false if it already existed.
func Has
method on SetHas checks if an address exists in the set.
func IterateByOffset
method on SetIterateByOffset walks through addresses starting at the given offset. The callback should return true to stop iteration.
func Remove
method on SetRemove deletes an address from the set. Returns true if the address was found and removed, false if it didn't exist.
func ReverseIterateByOffset
method on SetReverseIterateByOffset walks through addresses in reverse order starting at the given offset. The callback should return true to stop iteration.
func Size
method on SetSize returns the number of addresses in the set.
func Tree
method on SetTree returns the underlying AVL tree for advanced usage.