pub trait VisitNode<'a>: Sized + VisitNodeWithInfo<'a> {
// Provided method
fn visit<'b, C, V: Visitor<'a, C>>(
&'a self,
ctx: &'b mut C,
visitor: &'b mut V,
) -> VisitFlow { ... }
}
Expand description
Trait for visiting AST Nodes of a GraphQL language document in depth-first order using a custom visitor.
The visitor must implement the Visitor trait which may also define a custom context structure
that can be passed to the visit
method.
Provided Methods§
Sourcefn visit<'b, C, V: Visitor<'a, C>>(
&'a self,
ctx: &'b mut C,
visitor: &'b mut V,
) -> VisitFlow
fn visit<'b, C, V: Visitor<'a, C>>( &'a self, ctx: &'b mut C, visitor: &'b mut V, ) -> VisitFlow
Visit a GraphQL AST node tree recursively in depth-first order with a given visitor.
The visitor must implement the Visitor trait which may also define a custom context structure
that can be passed to the visit
method. By default the context is an empty unit ()
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.