Expand description
Defines two overrideable visitor traits that can be used to conveniently traverse the whole contents of an item. This is useful when e.g. dealing with types, which show up pretty much everywhere in the ast.
The crate defines two traits:
Structs§
- AstVisitable
Wrapper - Implementation detail: wrapper that implements
Visit[Mut]<T>
forT: #trait_name
, and delegates all the visiting to our trait’sdrive[_mut]
. Used in the implementation ofvisit_inner
- Body
Visitable Wrapper - Implementation detail: wrapper that implements
Visit[Mut]<T>
forT: #trait_name
, and delegates all the visiting to our trait’sdrive[_mut]
. Used in the implementation ofvisit_inner
- DynVisitor
- Ast and body visitor that uses dynamic dispatch to call the provided function on the visited values of the right type.
Traits§
- AstVisitable
- An overrideable visitor trait that can be used to conveniently traverse the whole contents of an item. This is useful when e.g. dealing with types, which show up pretty much everywhere in the ast.
- Body
Visitable - A smaller visitor group just for function bodies. This explores statements, places and operands, but does not recurse into types.
- Visit
Ast - Visit
AstMut - Visit
Body - Visit
Body Mut