Module iota::vec_set
- Struct
VecSet
- Constants
- Function
empty
- Function
singleton
- Function
insert
- Function
remove
- Function
contains
- Function
size
- Function
is_empty
- Function
into_keys
- Function
from_keys
- Function
keys
- Function
get_idx_opt
- Function
get_idx
use std::option;
use std::vector;
Struct VecSet
A set data structure backed by a vector. The set is guaranteed not to contain duplicate keys. All operations are O(N) in the size of the set. The intention of this data structure is only to provide the convenience of programming against a set API. Sets that need sorted iteration rather than insertion order iteration should be handwritten.
public struct VecSet<K: copy, drop> has copy, drop, store
Fields
contents: vector<K>