Module visitor

Module visitor 

Source

Structs§

AnyWalker
Walker
Wrapper for visitor that calls inner visitors. Inner visitor should implement Visitor trait and syn::visit_mut::VisitMut.

Enums§

RustCode
Enum that represents the different types with valid Rust code that can be visited using syn::Visitor. Usually syn::Block or syn::Expr.

Traits§

CustomNodeWalker
Define walker for CustomNode.
Visitor
Visitor api provide a way to traverse the node tree and modify its components. The api allows modification of all types of nodes, and some atoms like InvalidBlock or NodeName.

Functions§

visit_attributes
Visit attributes in array calling visitor methods.
visit_nodes
Visitor entrypoint. Visit nodes in array calling visitor methods. Recursively visit nodes in children, and attributes.
visit_nodes_with_custom
Visitor entrypoint. Visit nodes in array calling visitor methods. Recursively visit nodes in children, and attributes. Provide custom handler that is used to visit custom nodes. Custom handler should return true if visitor should continue to traverse, and call visitor methods for its children.