Struct rustc_metadata::cstore::crate_metadata
[−]
[src]
pub struct crate_metadata { pub name: String, pub extern_crate: Cell<Option<ExternCrate>>, pub data: MetadataBlob, pub cnum_map: RefCell<cnum_map>, pub cnum: CrateNum, pub codemap_import_info: RefCell<Vec<ImportedFileMap>>, pub staged_api: bool, pub index: Index, pub xref_index: DenseIndex, pub key_map: FnvHashMap<DefKey, DefIndex>, pub explicitly_linked: Cell<bool>, }
Unstable (
rustc_private
)Fields
name: String
Unstable (
rustc_private
)extern_crate: Cell<Option<ExternCrate>>
Unstable (
rustc_private
)Information about the extern crate that caused this crate to
be loaded. If this is None
, then the crate was injected
(e.g., by the allocator)
data: MetadataBlob
Unstable (
rustc_private
)cnum_map: RefCell<cnum_map>
Unstable (
rustc_private
)cnum: CrateNum
Unstable (
rustc_private
)codemap_import_info: RefCell<Vec<ImportedFileMap>>
Unstable (
rustc_private
)staged_api: bool
Unstable (
rustc_private
)index: Index
Unstable (
rustc_private
)xref_index: DenseIndex
Unstable (
rustc_private
)key_map: FnvHashMap<DefKey, DefIndex>
Unstable (
rustc_private
)For each public item in this crate, we encode a key. When the
crate is loaded, we read all the keys and put them in this
hashmap, which gives the reverse mapping. This allows us to
quickly retrace a DefPath
, which is needed for incremental
compilation support.
explicitly_linked: Cell<bool>
Unstable (
rustc_private
)Flag if this crate is required by an rlib version of this crate, or in other words whether it was explicitly linked to. An example of a crate where this is false is when an allocator crate is injected into the dependency list, and therefore isn't actually needed to link an rlib.