After pondering this for a while, I've come to realisation that what we call Entry is a distraction, and in fact, Query is the closest we have to HashMap's Entry.
This is because while HashMap returns Entry in response to it's key, we query using Areas and return Query in response. It would make sense therefore to make Query an enum with an Empty variant.
Another question is if changes to how we store data are needed. One thought i've had is that SlotMap<Handle, V> and an associated SecondaryMap<Handle, Area> might be a good solution.
After pondering this for a while, I've come to realisation that what we call
Entryis a distraction, and in fact,Queryis the closest we have toHashMap'sEntry.This is because while
HashMapreturnsEntryin response to it's key, we query usingAreasand returnQueryin response. It would make sense therefore to makeQueryanenumwith anEmptyvariant.Another question is if changes to how we store data are needed. One thought i've had is that
SlotMap<Handle, V>and an associatedSecondaryMap<Handle, Area>might be a good solution.