Enum rustc_typeck::hir::def::Def [−] [src]

pub enum Def {
    Fn(DefId),
    SelfTy(Option<DefId>, Option<u32>),
    Mod(DefId),
    ForeignMod(DefId),
    Static(DefId, bool),
    Const(DefId),
    AssociatedConst(DefId),
    Local(DefId, u32),
    Variant(DefId, DefId),
    Enum(DefId),
    TyAlias(DefId),
    AssociatedTy(DefId, DefId),
    Trait(DefId),
    PrimTy(PrimTy),
    TyParam(ParamSpace, u32, DefId, Name),
    Upvar(DefId, u32, usize, u32),
    Struct(DefId),
    Label(u32),
    Method(DefId),
    Err,
}
Unstable (rustc_private)

Variants

Fn(DefId)
Unstable (rustc_private)
SelfTy(Option<DefId>, Option<u32>)
Unstable (rustc_private)
Mod(DefId)
Unstable (rustc_private)
ForeignMod(DefId)
Unstable (rustc_private)
Static(DefId, bool)
Unstable (rustc_private)
Const(DefId)
Unstable (rustc_private)
AssociatedConst(DefId)
Unstable (rustc_private)
Local(DefId, u32)
Unstable (rustc_private)
Variant(DefId, DefId)
Unstable (rustc_private)
Enum(DefId)
Unstable (rustc_private)
TyAlias(DefId)
Unstable (rustc_private)
AssociatedTy(DefId, DefId)
Unstable (rustc_private)
Trait(DefId)
Unstable (rustc_private)
PrimTy(PrimTy)
Unstable (rustc_private)
TyParam(ParamSpace, u32, DefId, Name)
Unstable (rustc_private)
Upvar(DefId, u32, usize, u32)
Unstable (rustc_private)
Struct(DefId)
Unstable (rustc_private)
Label(u32)
Unstable (rustc_private)
Method(DefId)
Unstable (rustc_private)
Err
Unstable (rustc_private)

Methods

impl Def

fn var_id(&self) -> u32

fn def_id(&self) -> DefId

fn variant_def_ids(&self) -> Option<(DefId, DefId)>

fn kind_name(&self) -> &'static str

Trait Implementations

Derived Implementations

impl Debug for Def

fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>

Formats the value using the given formatter.

impl Hash for Def

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Decodable for Def

fn decode<__D>(__arg_0: &mut __D) -> Result<Def, __D::Error> where __D: Decoder

impl Encodable for Def

fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), __S::Error> where __S: Encoder

impl Eq for Def

impl PartialEq<Def> for Def

fn eq(&self, __arg_0: &Def) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Def) -> bool

This method tests for !=.

impl Copy for Def

impl Clone for Def

fn clone(&self) -> Def

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more