pub trait Visitor {
// Provided methods
fn visit_expression(&mut self, expression: Expression) -> Result<Expression> { ... }
fn visit_table_reference(&mut self, reference: Table) -> Result<Table> { ... }
fn visit_select(&mut self, select: Select) -> Result<Select> { ... }
}Expand description
Inspects or rewrites the nodes a Walker visits: each method gets a
node (its children already walked) and returns it, or its replacement.
The defaults keep every node.
PHP: the Utopia\Query\AST\Visitor interface.
Provided Methods§
Sourcefn visit_expression(&mut self, expression: Expression) -> Result<Expression>
fn visit_expression(&mut self, expression: Expression) -> Result<Expression>
Visits an expression.
PHP: Visitor::visitExpression().
Sourcefn visit_table_reference(&mut self, reference: Table) -> Result<Table>
fn visit_table_reference(&mut self, reference: Table) -> Result<Table>
Visits a table reference (of a FROM or a join).
PHP: Visitor::visitTableReference().
Sourcefn visit_select(&mut self, select: Select) -> Result<Select>
fn visit_select(&mut self, select: Select) -> Result<Select>
Visits a statement, after everything in it (subqueries included).
PHP: Visitor::visitSelect().
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".