Trait rustc::middle::cstore::CrateStore
[−]
[src]
pub trait CrateStore { fn crate_data_as_rc_any(&self, krate: CrateNum) -> Rc<Any>; fn metadata_loader(&self) -> &MetadataLoader; fn def_key(&self, def: DefId) -> DefKey; fn def_path(&self, def: DefId) -> DefPath; fn def_path_hash(&self, def: DefId) -> DefPathHash; fn def_path_table(&self, cnum: CrateNum) -> Rc<DefPathTable>; fn visibility_untracked(&self, def: DefId) -> Visibility; fn export_macros_untracked(&self, cnum: CrateNum); fn dep_kind_untracked(&self, cnum: CrateNum) -> DepKind; fn crate_name_untracked(&self, cnum: CrateNum) -> Symbol; fn crate_disambiguator_untracked(
&self,
cnum: CrateNum
) -> CrateDisambiguator; fn crate_hash_untracked(&self, cnum: CrateNum) -> Svh; fn struct_field_names_untracked(&self, def: DefId) -> Vec<Name>; fn item_children_untracked(&self, did: DefId, sess: &Session) -> Vec<Export>; fn load_macro_untracked(&self, did: DefId, sess: &Session) -> LoadedMacro; fn extern_mod_stmt_cnum_untracked(
&self,
emod_id: NodeId
) -> Option<CrateNum>; fn item_generics_cloned_untracked(
&self,
def: DefId,
sess: &Session
) -> Generics; fn associated_item_cloned_untracked(&self, def: DefId) -> AssociatedItem; fn postorder_cnums_untracked(&self) -> Vec<CrateNum>; fn crates_untracked(&self) -> Vec<CrateNum>; fn encode_metadata<'a, 'tcx>(
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
link_meta: &LinkMeta,
reachable: &NodeSet
) -> EncodedMetadata; 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?
A store of Rust crates, through with their metadata can be accessed.
Note that this trait should probably not be expanding today. All new functionality should be driven through queries instead!
If you find a method on this trait named {name}_untracked
it signifies
that it's not tracked for dependency information throughout compilation
(it'd break incremental compilation) and should only be called pre-HIR (e.g.
during resolve)
Required Methods
fn crate_data_as_rc_any(&self, krate: CrateNum) -> Rc<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
🔬 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
🔬 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(&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
🔬 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) -> Rc<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 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 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 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 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
🔬 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
🔬 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>
🔬 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, did: 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, did: 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 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 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
🔬 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>
🔬 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>
🔬 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,
reachable: &NodeSet
) -> EncodedMetadata
&self,
tcx: TyCtxt<'a, 'tcx, 'tcx>,
link_meta: &LinkMeta,
reachable: &NodeSet
) -> 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]
🔬 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?
Implementors
impl CrateStore for DummyCrateStore