Skip to main content

ModuleMap

type ModuleMap​

A package's modules, keyed by module name.

type ModuleMap struct {
// contains filtered or unexported fields
}

func LiftFromExternalModuleMap​

func LiftFromExternalModuleMap(handle uint64) *ModuleMap

func ModuleMapFromEntries​

func ModuleMapFromEntries(entries []ModuleMapEntry) *ModuleMap

Collect entries into a map. A key repeated across entries keeps the value of the last one.

func (*ModuleMap) ContainsKey​

func (_self *ModuleMap) ContainsKey(key *Identifier) bool

Whether a value is stored under `key`.

func (*ModuleMap) Destroy​

func (object *ModuleMap) Destroy()

func (*ModuleMap) Entries​

func (_self *ModuleMap) Entries() []ModuleMapEntry

Every entry, in key order.

func (*ModuleMap) Get​

func (_self *ModuleMap) Get(key *Identifier) *[]byte

The value stored under `key`, or `None` if there is none.

func (*ModuleMap) IsEmpty​

func (_self *ModuleMap) IsEmpty() bool

Whether the map holds no entries.

func (*ModuleMap) Keys​

func (_self *ModuleMap) Keys() []*Identifier

Every key, in key order.

func (*ModuleMap) Len​

func (_self *ModuleMap) Len() uint64

The number of entries.

func (*ModuleMap) Values​

func (_self *ModuleMap) Values() [][]byte

Every value, ordered by the key it is stored under.