Module rustc_metadata::index [] [src]

Unstable (rustc_private)

Structs

DenseIndex [Unstable]

A dense index with integer keys. Different API from IndexData (should these be merged?)

Index [Unstable]

As part of the metadata, we generate an index that stores, for each DefIndex, the position of the corresponding RBML document (if any). This is just a big [u32] slice, where an entry of u32::MAX indicates that there is no RBML document. This little struct just stores the offsets within the metadata of the start and end of this slice. These are actually part of an RBML document, but for looking things up in the metadata, we just discard the RBML positioning and jump directly to the data.

IndexData [Unstable]

While we are generating the metadata, we also track the position of each DefIndex. It is not required that all definitions appear in the metadata, nor that they are serialized in order, and therefore we first allocate the vector here and fill it with u32::MAX. Whenever an index is visited, we fill in the appropriate spot by calling record_position. We should never visit the same index twice.

Functions

write_dense_index [Unstable]