Enum rustc_hir::Node[−][src]

pub enum Node<'hir> {
Show 25 variants Param(&'hir Param<'hir>), Item(&'hir Item<'hir>), ForeignItem(&'hir ForeignItem<'hir>), TraitItem(&'hir TraitItem<'hir>), ImplItem(&'hir ImplItem<'hir>), Variant(&'hir Variant<'hir>), Field(&'hir FieldDef<'hir>), AnonConst(&'hir AnonConst), Expr(&'hir Expr<'hir>), Stmt(&'hir Stmt<'hir>), PathSegment(&'hir PathSegment<'hir>), Ty(&'hir Ty<'hir>), TraitRef(&'hir TraitRef<'hir>), Binding(&'hir Pat<'hir>), Pat(&'hir Pat<'hir>), Arm(&'hir Arm<'hir>), Block(&'hir Block<'hir>), Local(&'hir Local<'hir>), MacroDef(&'hir MacroDef<'hir>), Ctor(&'hir VariantData<'hir>), Lifetime(&'hir Lifetime), GenericParam(&'hir GenericParam<'hir>), Visibility(&'hir Visibility<'hir>), Crate(&'hir Mod<'hir>), Infer(&'hir InferArg),
}

Variants

Param

Tuple Fields of Param

0: &'hir Param<'hir>
Item

Tuple Fields of Item

0: &'hir Item<'hir>
ForeignItem

Tuple Fields of ForeignItem

0: &'hir ForeignItem<'hir>
TraitItem

Tuple Fields of TraitItem

0: &'hir TraitItem<'hir>
ImplItem

Tuple Fields of ImplItem

0: &'hir ImplItem<'hir>
Variant

Tuple Fields of Variant

0: &'hir Variant<'hir>
Field

Tuple Fields of Field

0: &'hir FieldDef<'hir>
AnonConst

Tuple Fields of AnonConst

0: &'hir AnonConst
Expr

Tuple Fields of Expr

0: &'hir Expr<'hir>
Stmt

Tuple Fields of Stmt

0: &'hir Stmt<'hir>
PathSegment

Tuple Fields of PathSegment

0: &'hir PathSegment<'hir>
Ty

Tuple Fields of Ty

0: &'hir Ty<'hir>
TraitRef

Tuple Fields of TraitRef

0: &'hir TraitRef<'hir>
Binding

Tuple Fields of Binding

0: &'hir Pat<'hir>
Pat

Tuple Fields of Pat

0: &'hir Pat<'hir>
Arm

Tuple Fields of Arm

0: &'hir Arm<'hir>
Block

Tuple Fields of Block

0: &'hir Block<'hir>
Local

Tuple Fields of Local

0: &'hir Local<'hir>
MacroDef

Tuple Fields of MacroDef

0: &'hir MacroDef<'hir>
Ctor

Ctor refers to the constructor of an enum variant or struct. Only tuple or unit variants with synthesized constructors.

Tuple Fields of Ctor

0: &'hir VariantData<'hir>
Lifetime

Tuple Fields of Lifetime

0: &'hir Lifetime
GenericParam

Tuple Fields of GenericParam

0: &'hir GenericParam<'hir>
Visibility

Tuple Fields of Visibility

0: &'hir Visibility<'hir>
Crate

Tuple Fields of Crate

0: &'hir Mod<'hir>
Infer

Tuple Fields of Infer

0: &'hir InferArg

Implementations

Returns Constness::Const when this node is a const fn/impl/item,

HACK(fee1-dead): or an associated type in a trait. This works because only typeck cares about const trait predicates, so although the predicates query would return const predicates when it does not need to be const, it wouldn’t have any effect.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes