Uniquely identifies a node in the HIR of the current crate. It is composed of the
owner, which is the
LocalDefIdof the directly enclosing
hir::ImplItem(i.e., the closest “item-like”), and the
local_idwhich is unique within the given owner.
ItemLocalIduniquely identifies something within a given “item-like”; that is, within a
hir::ImplItem. There is no guarantee that the numerical value of a given
ItemLocalIdcorresponds to the node’s position within the owning item in any way, but there is a guarantee that the
ItemLocalIds within an owner occupy a dense range of integers starting at zero, so a mapping that maps all or most nodes within an “item-like” to something else can be implemented by a
Vecinstead of a tree or hash map.