Skip to main content

Module insertion_ordered_map

Module insertion_ordered_map 

Source
Expand description

Node: cxx:Record:Luau.Common:Common/include/Luau/InsertionOrderedMap.h:15:insertion_ordered_map Source: Common/include/Luau/InsertionOrderedMap.h:14-145 (hand-ported, complete API)

A map preserving insertion order: pairs live in a Vec, an unordered index maps key -> position. insert is first-write-wins (a duplicate key is a no-op, matching C++). erase removes the pair and decrements every index after it, exactly like the C++ loop. C++ operator[] (find-or-default- insert) is get_or_default; C++ find returning an iterator maps to find returning the position, with get/get_mut for the common deref-the-iterator pattern.

Structsยง

InsertionOrderedMap