Trait bluejay_validator::executable::operation::Visitor
source · pub trait Visitor<'a, E: ExecutableDocument, S: SchemaDefinition, V: VariableValues> {
// Required method
fn new(
operation_definition: &'a E::OperationDefinition,
schema_definition: &'a S,
variable_values: &'a V,
cache: &'a Cache<'a, E, S>
) -> Self;
// Provided methods
fn visit_field(
&mut self,
field: &'a E::Field,
field_definition: &'a S::FieldDefinition,
scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>,
included: bool
) { ... }
fn leave_field(
&mut self,
field: &'a <E as ExecutableDocument>::Field,
field_definition: &'a S::FieldDefinition,
scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>,
included: bool
) { ... }
fn visit_variable_definition(
&mut self,
variable_definition: &'a E::VariableDefinition
) { ... }
}Required Methods§
fn new( operation_definition: &'a E::OperationDefinition, schema_definition: &'a S, variable_values: &'a V, cache: &'a Cache<'a, E, S> ) -> Self
Provided Methods§
sourcefn visit_field(
&mut self,
field: &'a E::Field,
field_definition: &'a S::FieldDefinition,
scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>,
included: bool
)
fn visit_field( &mut self, field: &'a E::Field, field_definition: &'a S::FieldDefinition, scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>, included: bool )
Visits the field. If a field is part of a fragment definition, it will be visited every time the fragment is spread.
§Variables
fieldis the field being visitedfield_definitionis the definition of the fieldscoped_typeis the type that the field definition is defined withinincludedis true when the field is known to be included in the response (based on the usage of@includeand@skipdirectives and the variable values)
sourcefn leave_field(
&mut self,
field: &'a <E as ExecutableDocument>::Field,
field_definition: &'a S::FieldDefinition,
scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>,
included: bool
)
fn leave_field( &mut self, field: &'a <E as ExecutableDocument>::Field, field_definition: &'a S::FieldDefinition, scoped_type: TypeDefinitionReference<'a, S::TypeDefinition>, included: bool )
Called after the field and all of its children have been visited.
See visit_field for more information about the variables.
sourcefn visit_variable_definition(
&mut self,
variable_definition: &'a E::VariableDefinition
)
fn visit_variable_definition( &mut self, variable_definition: &'a E::VariableDefinition )
Visits the variable definition.
§Variables
variable_definitionis the variable definition being visited
Object Safety§
This trait is not object safe.