Trait rustc::middle::cstore::CrateStore
[−]
[src]
pub trait CrateStore<'tcx> { fn stability(&self, def: DefId) -> Option<Stability>; fn deprecation(&self, def: DefId) -> Option<Deprecation>; fn visibility(&self, def: DefId) -> Visibility; fn closure_kind(&self, def_id: DefId) -> ClosureKind; fn closure_ty<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> ClosureTy<'tcx>; fn item_variances(&self, def: DefId) -> ItemVariances; fn repr_attrs(&self, def: DefId) -> Vec<ReprAttr>; fn item_type<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> TypeScheme<'tcx>; fn visible_parent_map<'a>(&'a self) -> RefMut<'a, DefIdMap<DefId>>; fn item_name(&self, def: DefId) -> Name; fn item_predicates<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> GenericPredicates<'tcx>; fn item_super_predicates<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> GenericPredicates<'tcx>; fn item_attrs(&self, def_id: DefId) -> Vec<Attribute>; fn item_symbol(&self, def: DefId) -> String; fn trait_def<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> TraitDef<'tcx>; fn adt_def<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> AdtDefMaster<'tcx>; fn method_arg_names(&self, did: DefId) -> Vec<String>; fn inherent_implementations_for_type(&self, def_id: DefId) -> Vec<DefId>; fn implementations_of_trait(&self, def_id: DefId) -> Vec<DefId>; fn provided_trait_methods<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Vec<Rc<Method<'tcx>>>; fn trait_item_def_ids(&self, def: DefId) -> Vec<ImplOrTraitItemId>; fn impl_items(&self, impl_def_id: DefId) -> Vec<ImplOrTraitItemId>; fn impl_trait_ref<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Option<TraitRef<'tcx>>; fn impl_polarity(&self, def: DefId) -> Option<ImplPolarity>; fn custom_coerce_unsized_kind(&self, def: DefId) -> Option<CustomCoerceUnsized>; fn associated_consts<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Vec<Rc<AssociatedConst<'tcx>>>; fn impl_parent(&self, impl_def_id: DefId) -> Option<DefId>; fn trait_of_item<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Option<DefId>; fn impl_or_trait_item<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Option<ImplOrTraitItem<'tcx>>; fn is_const_fn(&self, did: DefId) -> bool; fn is_defaulted_trait(&self, did: DefId) -> bool; fn is_impl(&self, did: DefId) -> bool; fn is_default_impl(&self, impl_did: DefId) -> bool; fn is_extern_item<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, did: DefId) -> bool; fn is_static_method(&self, did: DefId) -> bool; fn is_statically_included_foreign_item(&self, id: NodeId) -> bool; fn is_typedef(&self, did: DefId) -> bool; fn dylib_dependency_formats(&self, cnum: CrateNum) -> Vec<(CrateNum, LinkagePreference)>; fn lang_items(&self, cnum: CrateNum) -> Vec<(DefIndex, usize)>; fn missing_lang_items(&self, cnum: CrateNum) -> Vec<LangItem>; fn is_staged_api(&self, cnum: CrateNum) -> bool; fn is_explicitly_linked(&self, cnum: CrateNum) -> bool; fn is_allocator(&self, cnum: CrateNum) -> bool; fn is_panic_runtime(&self, cnum: CrateNum) -> bool; fn panic_strategy(&self, cnum: CrateNum) -> PanicStrategy; fn extern_crate(&self, cnum: CrateNum) -> Option<ExternCrate>; fn crate_attrs(&self, cnum: CrateNum) -> Vec<Attribute>; fn crate_name(&self, cnum: CrateNum) -> InternedString; fn original_crate_name(&self, cnum: CrateNum) -> InternedString; fn crate_hash(&self, cnum: CrateNum) -> Svh; fn crate_disambiguator(&self, cnum: CrateNum) -> InternedString; fn crate_struct_field_attrs(&self, cnum: CrateNum) -> FnvHashMap<DefId, Vec<Attribute>>; fn plugin_registrar_fn(&self, cnum: CrateNum) -> Option<DefId>; fn native_libraries(&self, cnum: CrateNum) -> Vec<(NativeLibraryKind, String)>; fn reachable_ids(&self, cnum: CrateNum) -> Vec<DefId>; fn def_index_for_def_key(&self, cnum: CrateNum, def: DefKey) -> Option<DefIndex>; fn def_key(&self, def: DefId) -> DefKey; fn relative_def_path(&self, def: DefId) -> DefPath; fn variant_kind(&self, def_id: DefId) -> Option<VariantKind>; fn struct_ctor_def_id(&self, struct_def_id: DefId) -> Option<DefId>; fn tuple_struct_definition_if_ctor(&self, did: DefId) -> Option<DefId>; fn struct_field_names(&self, def: DefId) -> Vec<Name>; fn item_children(&self, did: DefId) -> Vec<ChildItem>; fn crate_top_level_items(&self, cnum: CrateNum) -> Vec<ChildItem>; fn maybe_get_item_ast<'a>(&'tcx self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> FoundAst<'tcx>; fn maybe_get_item_mir<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Option<Mir<'tcx>>; fn is_item_mir_available(&self, def: DefId) -> bool; fn crates(&self) -> Vec<CrateNum>; fn used_libraries(&self) -> Vec<(String, NativeLibraryKind)>; fn used_link_args(&self) -> Vec<String>; fn metadata_filename(&self) -> &str; fn metadata_section_name(&self, target: &Target) -> &str; fn encode_type<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>, def_id_to_string: fn<'b>(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) -> Vec<u8>; fn used_crates(&self, prefer: LinkagePreference) -> Vec<(CrateNum, Option<PathBuf>)>; fn used_crate_source(&self, cnum: CrateNum) -> CrateSource; fn extern_mod_stmt_cnum(&self, emod_id: NodeId) -> Option<CrateNum>; fn encode_metadata<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, reexports: &ExportMap, item_symbols: &RefCell<NodeMap<String>>, link_meta: &LinkMeta, reachable: &NodeSet, mir_map: &MirMap<'tcx>, krate: &Crate) -> Vec<u8>; fn metadata_encoding_version(&self) -> &[u8]; }
Unstable (
rustc_private
)A store of Rust crates, through with their metadata can be accessed.
Required Methods
fn stability(&self, def: DefId) -> Option<Stability>
Unstable (
rustc_private
)fn deprecation(&self, def: DefId) -> Option<Deprecation>
Unstable (
rustc_private
)fn visibility(&self, def: DefId) -> Visibility
Unstable (
rustc_private
)fn closure_kind(&self, def_id: DefId) -> ClosureKind
Unstable (
rustc_private
)fn closure_ty<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> ClosureTy<'tcx>
Unstable (
rustc_private
)fn item_variances(&self, def: DefId) -> ItemVariances
Unstable (
rustc_private
)fn repr_attrs(&self, def: DefId) -> Vec<ReprAttr>
Unstable (
rustc_private
)fn item_type<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> TypeScheme<'tcx>
Unstable (
rustc_private
)fn visible_parent_map<'a>(&'a self) -> RefMut<'a, DefIdMap<DefId>>
Unstable (
rustc_private
)fn item_name(&self, def: DefId) -> Name
Unstable (
rustc_private
)fn item_predicates<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> GenericPredicates<'tcx>
Unstable (
rustc_private
)fn item_super_predicates<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> GenericPredicates<'tcx>
Unstable (
rustc_private
)fn item_attrs(&self, def_id: DefId) -> Vec<Attribute>
Unstable (
rustc_private
)fn item_symbol(&self, def: DefId) -> String
Unstable (
rustc_private
)fn trait_def<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> TraitDef<'tcx>
Unstable (
rustc_private
)fn adt_def<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> AdtDefMaster<'tcx>
Unstable (
rustc_private
)fn method_arg_names(&self, did: DefId) -> Vec<String>
Unstable (
rustc_private
)fn inherent_implementations_for_type(&self, def_id: DefId) -> Vec<DefId>
Unstable (
rustc_private
)fn implementations_of_trait(&self, def_id: DefId) -> Vec<DefId>
Unstable (
rustc_private
)fn provided_trait_methods<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Vec<Rc<Method<'tcx>>>
Unstable (
rustc_private
)fn trait_item_def_ids(&self, def: DefId) -> Vec<ImplOrTraitItemId>
Unstable (
rustc_private
)fn impl_items(&self, impl_def_id: DefId) -> Vec<ImplOrTraitItemId>
Unstable (
rustc_private
)fn impl_trait_ref<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Option<TraitRef<'tcx>>
Unstable (
rustc_private
)fn impl_polarity(&self, def: DefId) -> Option<ImplPolarity>
Unstable (
rustc_private
)fn custom_coerce_unsized_kind(&self, def: DefId) -> Option<CustomCoerceUnsized>
Unstable (
rustc_private
)fn associated_consts<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Vec<Rc<AssociatedConst<'tcx>>>
Unstable (
rustc_private
)fn impl_parent(&self, impl_def_id: DefId) -> Option<DefId>
Unstable (
rustc_private
)fn trait_of_item<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Option<DefId>
Unstable (
rustc_private
)fn impl_or_trait_item<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Option<ImplOrTraitItem<'tcx>>
Unstable (
rustc_private
)fn is_const_fn(&self, did: DefId) -> bool
Unstable (
rustc_private
)fn is_defaulted_trait(&self, did: DefId) -> bool
Unstable (
rustc_private
)fn is_impl(&self, did: DefId) -> bool
Unstable (
rustc_private
)fn is_default_impl(&self, impl_did: DefId) -> bool
Unstable (
rustc_private
)fn is_extern_item<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, did: DefId) -> bool
Unstable (
rustc_private
)fn is_static_method(&self, did: DefId) -> bool
Unstable (
rustc_private
)fn is_statically_included_foreign_item(&self, id: NodeId) -> bool
Unstable (
rustc_private
)fn is_typedef(&self, did: DefId) -> bool
Unstable (
rustc_private
)fn dylib_dependency_formats(&self, cnum: CrateNum) -> Vec<(CrateNum, LinkagePreference)>
Unstable (
rustc_private
)fn lang_items(&self, cnum: CrateNum) -> Vec<(DefIndex, usize)>
Unstable (
rustc_private
)fn missing_lang_items(&self, cnum: CrateNum) -> Vec<LangItem>
Unstable (
rustc_private
)fn is_staged_api(&self, cnum: CrateNum) -> bool
Unstable (
rustc_private
)fn is_explicitly_linked(&self, cnum: CrateNum) -> bool
Unstable (
rustc_private
)fn is_allocator(&self, cnum: CrateNum) -> bool
Unstable (
rustc_private
)fn is_panic_runtime(&self, cnum: CrateNum) -> bool
Unstable (
rustc_private
)fn panic_strategy(&self, cnum: CrateNum) -> PanicStrategy
Unstable (
rustc_private
)fn extern_crate(&self, cnum: CrateNum) -> Option<ExternCrate>
Unstable (
rustc_private
)fn crate_attrs(&self, cnum: CrateNum) -> Vec<Attribute>
Unstable (
rustc_private
)fn crate_name(&self, cnum: CrateNum) -> InternedString
Unstable (
rustc_private
)The name of the crate as it is referred to in source code of the current crate.
fn original_crate_name(&self, cnum: CrateNum) -> InternedString
Unstable (
rustc_private
)The name of the crate as it is stored in the crate's metadata.
fn crate_hash(&self, cnum: CrateNum) -> Svh
Unstable (
rustc_private
)fn crate_disambiguator(&self, cnum: CrateNum) -> InternedString
Unstable (
rustc_private
)fn crate_struct_field_attrs(&self, cnum: CrateNum) -> FnvHashMap<DefId, Vec<Attribute>>
Unstable (
rustc_private
)fn plugin_registrar_fn(&self, cnum: CrateNum) -> Option<DefId>
Unstable (
rustc_private
)fn native_libraries(&self, cnum: CrateNum) -> Vec<(NativeLibraryKind, String)>
Unstable (
rustc_private
)fn reachable_ids(&self, cnum: CrateNum) -> Vec<DefId>
Unstable (
rustc_private
)fn def_index_for_def_key(&self, cnum: CrateNum, def: DefKey) -> Option<DefIndex>
Unstable (
rustc_private
)fn def_key(&self, def: DefId) -> DefKey
Unstable (
rustc_private
)fn relative_def_path(&self, def: DefId) -> DefPath
Unstable (
rustc_private
)fn variant_kind(&self, def_id: DefId) -> Option<VariantKind>
Unstable (
rustc_private
)fn struct_ctor_def_id(&self, struct_def_id: DefId) -> Option<DefId>
Unstable (
rustc_private
)fn tuple_struct_definition_if_ctor(&self, did: DefId) -> Option<DefId>
Unstable (
rustc_private
)fn struct_field_names(&self, def: DefId) -> Vec<Name>
Unstable (
rustc_private
)fn item_children(&self, did: DefId) -> Vec<ChildItem>
Unstable (
rustc_private
)fn crate_top_level_items(&self, cnum: CrateNum) -> Vec<ChildItem>
Unstable (
rustc_private
)fn maybe_get_item_ast<'a>(&'tcx self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> FoundAst<'tcx>
Unstable (
rustc_private
)fn maybe_get_item_mir<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, def: DefId) -> Option<Mir<'tcx>>
Unstable (
rustc_private
)fn is_item_mir_available(&self, def: DefId) -> bool
Unstable (
rustc_private
)fn crates(&self) -> Vec<CrateNum>
Unstable (
rustc_private
)fn used_libraries(&self) -> Vec<(String, NativeLibraryKind)>
Unstable (
rustc_private
)fn used_link_args(&self) -> Vec<String>
Unstable (
rustc_private
)fn metadata_filename(&self) -> &str
Unstable (
rustc_private
)fn metadata_section_name(&self, target: &Target) -> &str
Unstable (
rustc_private
)fn encode_type<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, ty: Ty<'tcx>, def_id_to_string: fn<'b>(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) -> Vec<u8>
Unstable (
rustc_private
)fn used_crates(&self, prefer: LinkagePreference) -> Vec<(CrateNum, Option<PathBuf>)>
Unstable (
rustc_private
)fn used_crate_source(&self, cnum: CrateNum) -> CrateSource
Unstable (
rustc_private
)fn extern_mod_stmt_cnum(&self, emod_id: NodeId) -> Option<CrateNum>
Unstable (
rustc_private
)fn encode_metadata<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>, reexports: &ExportMap, item_symbols: &RefCell<NodeMap<String>>, link_meta: &LinkMeta, reachable: &NodeSet, mir_map: &MirMap<'tcx>, krate: &Crate) -> Vec<u8>
Unstable (
rustc_private
)fn metadata_encoding_version(&self) -> &[u8]
Unstable (
rustc_private
)Implementors
impl<'tcx> CrateStore<'tcx> for DummyCrateStore