Struct rustc_metadata::cstore::CStore [−][src]
pub struct CStore {
metas: RwLock<IndexVec<CrateNum, Option<Lrc<CrateMetadata>>>>,
extern_mod_crate_map: Lock<NodeMap<CrateNum>>,
pub metadata_loader: Box<MetadataLoader + Sync>,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
metas: RwLock<IndexVec<CrateNum, Option<Lrc<CrateMetadata>>>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
extern_mod_crate_map: Lock<NodeMap<CrateNum>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Map from NodeId's of local extern crate statements to crate numbers
metadata_loader: Box<MetadataLoader + Sync>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl CStore[src]
impl CStorepub fn new(metadata_loader: Box<MetadataLoader + Sync>) -> CStore[src]
pub fn new(metadata_loader: Box<MetadataLoader + Sync>) -> CStore🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn next_crate_num(&self) -> CrateNum[src]
pub fn next_crate_num(&self) -> CrateNum🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
You cannot use this function to allocate a CrateNum in a thread-safe manner. It is currently only used in CrateLoader which is single-threaded code.
pub fn get_crate_data(&self, cnum: CrateNum) -> Lrc<CrateMetadata>[src]
pub fn get_crate_data(&self, cnum: CrateNum) -> Lrc<CrateMetadata>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn set_crate_data(&self, cnum: CrateNum, data: Lrc<CrateMetadata>)[src]
pub fn set_crate_data(&self, cnum: CrateNum, data: Lrc<CrateMetadata>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn iter_crate_data<I>(&self, i: I) where
I: FnMut(CrateNum, &Lrc<CrateMetadata>), [src]
pub fn iter_crate_data<I>(&self, i: I) where
I: FnMut(CrateNum, &Lrc<CrateMetadata>), 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn crate_dependencies_in_rpo(&self, krate: CrateNum) -> Vec<CrateNum>[src]
pub fn crate_dependencies_in_rpo(&self, krate: CrateNum) -> Vec<CrateNum>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn push_dependencies_in_postorder(
&self,
ordering: &mut Vec<CrateNum>,
krate: CrateNum
)[src]
pub fn push_dependencies_in_postorder(
&self,
ordering: &mut Vec<CrateNum>,
krate: CrateNum
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn do_postorder_cnums_untracked(&self) -> Vec<CrateNum>[src]
pub fn do_postorder_cnums_untracked(&self) -> Vec<CrateNum>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn add_extern_mod_stmt_cnum(&self, emod_id: NodeId, cnum: CrateNum)[src]
pub fn add_extern_mod_stmt_cnum(&self, emod_id: NodeId, cnum: CrateNum)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn do_extern_mod_stmt_cnum(&self, emod_id: NodeId) -> Option<CrateNum>[src]
pub fn do_extern_mod_stmt_cnum(&self, emod_id: NodeId) -> Option<CrateNum>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl CrateStore for CStore[src]
impl CrateStore for CStorefn crate_data_as_rc_any(&self, krate: CrateNum) -> Lrc<Any>[src]
fn crate_data_as_rc_any(&self, krate: CrateNum) -> Lrc<Any>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn metadata_loader(&self) -> &MetadataLoader[src]
fn metadata_loader(&self) -> &MetadataLoader🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn visibility_untracked(&self, def: DefId) -> Visibility[src]
fn visibility_untracked(&self, def: DefId) -> Visibility🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn item_generics_cloned_untracked(&self, def: DefId, sess: &Session) -> Generics[src]
fn item_generics_cloned_untracked(&self, def: DefId, sess: &Session) -> Generics🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn associated_item_cloned_untracked(&self, def: DefId) -> AssociatedItem[src]
fn associated_item_cloned_untracked(&self, def: DefId) -> AssociatedItem🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn dep_kind_untracked(&self, cnum: CrateNum) -> DepKind[src]
fn dep_kind_untracked(&self, cnum: CrateNum) -> DepKind🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn export_macros_untracked(&self, cnum: CrateNum)[src]
fn export_macros_untracked(&self, cnum: CrateNum)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol[src]
fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn crate_disambiguator_untracked(&self, cnum: CrateNum) -> CrateDisambiguator[src]
fn crate_disambiguator_untracked(&self, cnum: CrateNum) -> CrateDisambiguator🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh[src]
fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn def_key(&self, def: DefId) -> DefKey[src]
fn def_key(&self, def: DefId) -> DefKey🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Returns the DefKey for a given DefId. This indicates the
parent DefId as well as some idea of what kind of data the
DefId refers to.
fn def_path(&self, def: DefId) -> DefPath[src]
fn def_path(&self, def: DefId) -> DefPath🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn def_path_hash(&self, def: DefId) -> DefPathHash[src]
fn def_path_hash(&self, def: DefId) -> DefPathHash🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn def_path_table(&self, cnum: CrateNum) -> Lrc<DefPathTable>[src]
fn def_path_table(&self, cnum: CrateNum) -> Lrc<DefPathTable>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn struct_field_names_untracked(&self, def: DefId) -> Vec<Name>[src]
fn struct_field_names_untracked(&self, def: DefId) -> Vec<Name>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn item_children_untracked(&self, def_id: DefId, sess: &Session) -> Vec<Export>[src]
fn item_children_untracked(&self, def_id: DefId, sess: &Session) -> Vec<Export>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn load_macro_untracked(&self, id: DefId, sess: &Session) -> LoadedMacro[src]
fn load_macro_untracked(&self, id: DefId, sess: &Session) -> LoadedMacro🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn crates_untracked(&self) -> Vec<CrateNum>[src]
fn crates_untracked(&self) -> Vec<CrateNum>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn extern_mod_stmt_cnum_untracked(&self, emod_id: NodeId) -> Option<CrateNum>[src]
fn extern_mod_stmt_cnum_untracked(&self, emod_id: NodeId) -> Option<CrateNum>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn postorder_cnums_untracked(&self) -> Vec<CrateNum>[src]
fn postorder_cnums_untracked(&self) -> Vec<CrateNum>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn encode_metadata<'a, 'tcx>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
link_meta: &LinkMeta
) -> EncodedMetadata[src]
fn encode_metadata<'a, 'tcx>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
link_meta: &LinkMeta
) -> EncodedMetadata🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn metadata_encoding_version(&self) -> &[u8][src]
fn metadata_encoding_version(&self) -> &[u8]🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?