UNPKG

@mysten/suins

Version:
23 lines (22 loc) 948 B
/************************************************************** * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED * **************************************************************/ import { type BcsType, bcs } from '@mysten/sui/bcs'; import { MoveStruct } from '../../../utils/index.js'; const $moduleName = '0x2::vec_set'; /** * 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. */ export function VecSet<K extends BcsType<any>>(...typeParameters: [K]) { return new MoveStruct({ name: `${$moduleName}::VecSet<${typeParameters[0].name as K['name']}>`, fields: { contents: bcs.vector(typeParameters[0]), }, }); }