[−][src]Struct rustc_metadata::creader::CStore

pub struct CStore {
    metas: IndexVec<CrateNum, Option<Lrc<CrateMetadata>>>,
    injected_panic_runtime: Option<CrateNum>,
    allocator_kind: Option<AllocatorKind>,
    has_global_allocator: bool,
}

Fields

metas: IndexVec<CrateNum, Option<Lrc<CrateMetadata>>>injected_panic_runtime: Option<CrateNum>allocator_kind: Option<AllocatorKind>

This crate needs an allocator and either provides it itself, or finds it in a dependency. If the above is true, then this field denotes the kind of the found allocator.

has_global_allocator: bool

This crate has a #[global_allocator] item.

Implementations

impl CStore[src]

pub fn struct_field_names_untracked(
    &self,
    def: DefId,
    sess: &Session
) -> Vec<Spanned<Symbol>>
[src]

pub fn item_children_untracked(
    &self,
    def_id: DefId,
    sess: &Session
) -> Vec<Export<HirId>>
[src]

pub fn load_macro_untracked(&self, id: DefId, sess: &Session) -> LoadedMacro[src]

pub fn associated_item_cloned_untracked(
    &self,
    def: DefId,
    sess: &Session
) -> AssocItem
[src]

pub fn crate_source_untracked(&self, cnum: CrateNum) -> CrateSource[src]

pub fn get_span_untracked(&self, def_id: DefId, sess: &Session) -> Span[src]

pub fn item_generics_num_lifetimes(
    &self,
    def_id: DefId,
    sess: &Session
) -> usize
[src]

pub fn module_expansion_untracked(
    &self,
    def_id: DefId,
    sess: &Session
) -> ExpnId
[src]

impl CStore[src]

pub(crate) fn from_tcx(tcx: TyCtxt<'_>) -> &CStore[src]

pub(in creader) fn alloc_new_crate_num(
    &mut self
) -> CrateNum
[src]

pub(crate) fn get_crate_data(&self, cnum: CrateNum) -> CrateMetadataRef<'_>[src]

pub(in creader) fn set_crate_data(
    &mut self,
    cnum: CrateNum,
    data: CrateMetadata
)
[src]

pub(crate) fn iter_crate_data(&self, f: impl FnMut(CrateNum, &CrateMetadata))[src]

pub(in creader) fn push_dependencies_in_postorder(
    &self,
    deps: &mut Vec<CrateNum>,
    cnum: CrateNum
)
[src]

pub(crate) fn crate_dependencies_in_postorder(
    &self,
    cnum: CrateNum
) -> Vec<CrateNum>
[src]

pub(in creader) fn crate_dependencies_in_reverse_postorder(
    &self,
    cnum: CrateNum
) -> Vec<CrateNum>
[src]

pub(crate) fn injected_panic_runtime(&self) -> Option<CrateNum>[src]

pub(crate) fn allocator_kind(&self) -> Option<AllocatorKind>[src]

pub(crate) fn has_global_allocator(&self) -> bool[src]

Trait Implementations

impl Clone for CStore[src]

impl CrateStore for CStore[src]

pub fn def_key(&self, def: DefId) -> DefKey[src]

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.

Auto Trait Implementations

impl !RefUnwindSafe for CStore

impl !Send for CStore

impl !Sync for CStore

impl Unpin for CStore

impl !UnwindSafe for CStore

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.