# Trait rustc_ast::ast_traits::HasNodeId

source ·

    pub trait HasNodeId {
        // Required methods
        fn node_id(&self) -> NodeId;
        fn node_id_mut(&mut self) -> &mut NodeId;
    }

Expand description

A trait for AST nodes having an ID.

## Required Methods§

source

#### fn node_id(&self) -> NodeId

source

#### fn node_id_mut(&mut self) -> &mut NodeId

## Implementors§

source§

### impl HasNodeId for Arm

source§

### impl HasNodeId for Crate

source§

### impl HasNodeId for Expr

source§

### impl HasNodeId for ExprField

source§

### impl HasNodeId for FieldDef

source§

### impl HasNodeId for GenericParam

source§

### impl HasNodeId for Item

source§

### impl HasNodeId for Param

source§

### impl HasNodeId for Pat

source§

### impl HasNodeId for PatField

source§

### impl HasNodeId for Stmt

source§

### impl HasNodeId for Ty

source§

### impl HasNodeId for Variant

source§

### impl HasNodeId for AssocItem

source§

### impl HasNodeId for ForeignItem

source§

### impl<T: AstDeref<Target: HasNodeId>> HasNodeId for T