[][src]Struct rustc_ap_rustc_span::def_id::DefId

pub struct DefId {
    pub krate: CrateNum,
    pub index: DefIndex,
}

A DefId identifies a particular definition, by combining a crate index and a def index.

Fields

krate: CrateNumindex: DefIndex

Methods

impl DefId[src]

pub fn local(index: DefIndex) -> DefId[src]

Makes a local DefId from the given DefIndex.

pub fn is_local(self) -> bool[src]

pub fn to_local(self) -> LocalDefId[src]

pub fn is_top_level_module(self) -> bool[src]

Trait Implementations

impl Clone for DefId[src]

impl Copy for DefId[src]

impl Debug for DefId[src]

impl Eq for DefId[src]

impl Hash for DefId[src]

impl<CTX: HashStableContext> HashStable<CTX> for DefId[src]

impl Ord for DefId[src]

impl PartialEq<DefId> for DefId[src]

impl PartialOrd<DefId> for DefId[src]

impl StructuralEq for DefId[src]

impl StructuralPartialEq for DefId[src]

impl UseSpecializedDecodable for DefId[src]

impl UseSpecializedEncodable for DefId[src]

Auto Trait Implementations

impl RefUnwindSafe for DefId

impl Send for DefId

impl Sync for DefId

impl Unpin for DefId

impl UnwindSafe for DefId

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> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

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

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

impl<E> SpecializationError for E[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.