Trait Visit

Source
pub trait Visit<'hir> {
    type BreakValue;

Show 29 methods // Required method fn hir(&self) -> &'hir Hir<'hir>; // Provided methods fn visit_nested_source( &mut self, id: SourceId, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_nested_item(&mut self, id: ItemId) -> ControlFlow<Self::BreakValue> { ... } fn visit_item( &mut self, item: Item<'hir, 'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_nested_contract( &mut self, id: ContractId, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_contract( &mut self, contract: &'hir Contract<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_nested_function( &mut self, id: FunctionId, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_function( &mut self, func: &'hir Function<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_modifier( &mut self, modifier: &'hir Modifier<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_nested_var( &mut self, id: VariableId, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_var( &mut self, var: &'hir Variable<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_expr( &mut self, expr: &'hir Expr<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_call_args( &mut self, args: &'hir CallArgs<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_stmt( &mut self, stmt: &'hir Stmt<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn visit_ty( &mut self, ty: &'hir Type<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_nested_source( &mut self, id: SourceId, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_nested_item(&mut self, id: ItemId) -> ControlFlow<Self::BreakValue> { ... } fn walk_item( &mut self, item: Item<'hir, 'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_nested_contract( &mut self, id: ContractId, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_contract( &mut self, contract: &'hir Contract<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_nested_function( &mut self, id: FunctionId, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_function( &mut self, func: &'hir Function<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_modifier( &mut self, modifier: &'hir Modifier<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_nested_var( &mut self, id: VariableId, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_var( &mut self, var: &'hir Variable<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_expr( &mut self, expr: &'hir Expr<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_call_args( &mut self, args: &'hir CallArgs<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_stmt( &mut self, stmt: &'hir Stmt<'hir>, ) -> ControlFlow<Self::BreakValue> { ... } fn walk_ty(&mut self, ty: &'hir Type<'hir>) -> ControlFlow<Self::BreakValue> { ... }
}
Expand description

HIR traversal.

Required Associated Types§

Source

type BreakValue

The value returned when breaking from the traversal.

This can be Never to indicate that the traversal should never break.

Required Methods§

Source

fn hir(&self) -> &'hir Hir<'hir>

Returns the HIR map.

Provided Methods§

Source

fn visit_nested_source(&mut self, id: SourceId) -> ControlFlow<Self::BreakValue>

Source

fn visit_nested_item(&mut self, id: ItemId) -> ControlFlow<Self::BreakValue>

Source

fn visit_item( &mut self, item: Item<'hir, 'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_nested_contract( &mut self, id: ContractId, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_contract( &mut self, contract: &'hir Contract<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_nested_function( &mut self, id: FunctionId, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_function( &mut self, func: &'hir Function<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_modifier( &mut self, modifier: &'hir Modifier<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_nested_var(&mut self, id: VariableId) -> ControlFlow<Self::BreakValue>

Source

fn visit_var( &mut self, var: &'hir Variable<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_expr( &mut self, expr: &'hir Expr<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_call_args( &mut self, args: &'hir CallArgs<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_stmt( &mut self, stmt: &'hir Stmt<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn visit_ty(&mut self, ty: &'hir Type<'hir>) -> ControlFlow<Self::BreakValue>

Source

fn walk_nested_source(&mut self, id: SourceId) -> ControlFlow<Self::BreakValue>

Source

fn walk_nested_item(&mut self, id: ItemId) -> ControlFlow<Self::BreakValue>

Source

fn walk_item(&mut self, item: Item<'hir, 'hir>) -> ControlFlow<Self::BreakValue>

Source

fn walk_nested_contract( &mut self, id: ContractId, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_contract( &mut self, contract: &'hir Contract<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_nested_function( &mut self, id: FunctionId, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_function( &mut self, func: &'hir Function<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_modifier( &mut self, modifier: &'hir Modifier<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_nested_var(&mut self, id: VariableId) -> ControlFlow<Self::BreakValue>

Source

fn walk_var( &mut self, var: &'hir Variable<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_expr(&mut self, expr: &'hir Expr<'hir>) -> ControlFlow<Self::BreakValue>

Source

fn walk_call_args( &mut self, args: &'hir CallArgs<'hir>, ) -> ControlFlow<Self::BreakValue>

Source

fn walk_stmt(&mut self, stmt: &'hir Stmt<'hir>) -> ControlFlow<Self::BreakValue>

Source

fn walk_ty(&mut self, ty: &'hir Type<'hir>) -> ControlFlow<Self::BreakValue>

Implementors§