Struct rustc_metadata::index::IndexData [] [src]

pub struct IndexData {
    // some fields omitted
}
Unstable (rustc_private)

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.

Methods

impl IndexData
[src]

fn new(max_index: usize) -> IndexData

fn record(&mut self, def_id: DefId, position: u64)

fn record_index(&mut self, item: DefIndex, position: u64)

fn write_index(&self, buf: &mut Cursor<Vec<u8>>)