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

pub enum Def {
    Fn(DefId),
    SelfTy(Option<DefId>, Option<u32>),
    Mod(DefId),
    ForeignMod(DefId),
    Static(DefIdbool),
    Const(DefId),
    AssociatedConst(DefId),
    Local(DefIdu32),
    Variant(DefIdDefId),
    Enum(DefId),
    TyAlias(DefId),
    AssociatedTy(DefIdDefId),
    Trait(DefId),
    PrimTy(PrimTy),
    TyParam(ParamSpaceu32DefIdName),
    Upvar(DefIdu32usizeu32),
    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(DefIdbool)
Unstable (rustc_private)
Const(DefId)
Unstable (rustc_private)
AssociatedConst(DefId)
Unstable (rustc_private)
Local(DefIdu32)
Unstable (rustc_private)
Variant(DefIdDefId)
Unstable (rustc_private)
Enum(DefId)
Unstable (rustc_private)
TyAlias(DefId)
Unstable (rustc_private)
AssociatedTy(DefIdDefId)
Unstable (rustc_private)
Trait(DefId)
Unstable (rustc_private)
PrimTy(PrimTy)
Unstable (rustc_private)
TyParam(ParamSpaceu32DefIdName)
Unstable (rustc_private)
Upvar(DefIdu32usizeu32)
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