Struct ValidationContext

Source
pub struct ValidationContext<'a> {
    pub arena: &'a Bump,
    pub errors: Vec<'a, &'a str>,
}
Expand description

The ValidationContext carrying a reference to the AST Context’s arena and a list of errors.

New errors are added to the list as validation continues to issue error messages if validation has failed on a document.

Fields§

§arena: &'a Bump§errors: Vec<'a, &'a str>

Implementations§

Source§

impl<'a> ValidationContext<'a>

Source

pub fn new(ctx: &'a ASTContext) -> Self

Create a new ValidationContext given an AST Context.

Source

pub fn add_error<S: AsRef<str>>(&mut self, str: S)

Add an error to the list of errors in the ValidationContext.

This is called inside of validation rules to add an error to the list and fail validation of the currently validating document.

Source

pub fn to_result(self) -> Result<(), Error>

Convert the context into a result which carries an error if validation has failed on the current document.

This is used by ValidateNode and the ValidationRule’s validate method to convert the context into a result.

Trait Implementations§

Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for KnownFragmentNames<'a>

Source§

fn enter_fragment( &mut self, _ctx: &mut ValidationContext<'a>, fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut ValidationContext<'a>, spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, ctx: &mut ValidationContext<'a>, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut ValidationContext<'a>, _var_def: &'a VariableDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn enter_argument( &mut self, _ctx: &mut ValidationContext<'a>, _argument: &'a Argument<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn enter_directive( &mut self, _ctx: &mut ValidationContext<'a>, _directive: &'a Directive<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn enter_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for LoneAnonymousOperation

Source§

fn enter_fragment( &mut self, _ctx: &mut ValidationContext<'a>, _operation: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn enter_operation( &mut self, _ctx: &mut ValidationContext<'a>, operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, ctx: &mut ValidationContext<'a>, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn enter_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn enter_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for NoFragmentCycles<'a>

Source§

fn enter_operation( &mut self, _ctx: &mut ValidationContext<'a>, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn enter_fragment( &mut self, _ctx: &mut ValidationContext<'a>, _fragment: &'a FragmentDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut ValidationContext<'a>, fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut ValidationContext<'a>, spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, ctx: &mut ValidationContext<'a>, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut ValidationContext<'a>, _var_def: &'a VariableDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn enter_argument( &mut self, _ctx: &mut ValidationContext<'a>, _argument: &'a Argument<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn enter_directive( &mut self, _ctx: &mut ValidationContext<'a>, _directive: &'a Directive<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for NoUndefinedVariables<'a>

Source§

fn enter_variable_definition( &mut self, _ctx: &mut ValidationContext<'a>, var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn enter_argument( &mut self, _ctx: &mut ValidationContext<'a>, argument: &'a Argument<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn leave_operation( &mut self, ctx: &mut ValidationContext<'a>, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut ValidationContext<'a>, fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut ValidationContext<'a>, spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, ctx: &mut ValidationContext<'a>, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn enter_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn enter_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn enter_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for NoUnusedFragments<'a>

Source§

fn enter_fragment( &mut self, _ctx: &mut ValidationContext<'a>, fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut ValidationContext<'a>, spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, ctx: &mut ValidationContext<'a>, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut ValidationContext<'a>, _var_def: &'a VariableDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn enter_argument( &mut self, _ctx: &mut ValidationContext<'a>, _argument: &'a Argument<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn enter_directive( &mut self, _ctx: &mut ValidationContext<'a>, _directive: &'a Directive<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn enter_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for UniqueArgumentNames<'a>

Source§

fn enter_field( &mut self, _ctx: &mut ValidationContext<'a>, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn enter_directive( &mut self, _ctx: &mut ValidationContext<'a>, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn enter_argument( &mut self, ctx: &mut ValidationContext<'a>, argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut ValidationContext<'a>, _var_def: &'a VariableDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn enter_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn enter_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for UniqueFragmentNames<'a>

Source§

fn enter_fragment( &mut self, ctx: &mut ValidationContext<'a>, fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn enter_operation( &mut self, _ctx: &mut ValidationContext<'a>, _operation: &'a OperationDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn enter_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn enter_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for UniqueOperationNames<'a>

Source§

fn enter_operation( &mut self, ctx: &mut ValidationContext<'a>, operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn enter_fragment( &mut self, _ctx: &mut ValidationContext<'a>, _fragment: &'a FragmentDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn enter_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn enter_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn enter_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.
Source§

impl<'a> Visitor<'a, ValidationContext<'a>> for UniqueVariableNames<'a>

Source§

fn enter_operation( &mut self, _ctx: &mut ValidationContext<'a>, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an OperationDefinition node is visited and before its child nodes are visited.
Source§

fn enter_variable_definition( &mut self, ctx: &mut ValidationContext<'a>, var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a VariableDefinition node is visited and before its child nodes are visited.
Source§

fn enter_selection_set( &mut self, _ctx: &mut ValidationContext<'a>, _selection_set: &'a SelectionSet<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a SelectionSet node is visited and before its child nodes are visited.
Source§

fn enter_directive( &mut self, _ctx: &mut ValidationContext<'a>, _fragment: &'a Directive<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a Directive node is visited and before its child nodes are visited.
Source§

fn enter_fragment( &mut self, _ctx: &mut ValidationContext<'a>, _fragment: &'a FragmentDefinition<'_>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentDefinition node is visited and before its child nodes are visited.
Source§

fn compose<V: Visitor<'a, Context>>( self, other: V, ) -> ComposedVisitor<'a, Context, Self, V>

Combines two visitors into one that will run both the original and passed visitor concurrently. Read more
Source§

fn enter_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Document is visited and before its child nodes are visited.
Source§

fn leave_document( &mut self, _ctx: &mut Context, _document: &'a Document<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Document and its child nodes were visited.
Source§

fn leave_operation( &mut self, _ctx: &mut Context, _operation: &'a OperationDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an OperationDefinition and its child node were visited.
Source§

fn leave_fragment( &mut self, _ctx: &mut Context, _fragment: &'a FragmentDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentDefinition node and its child nodes were visited.
Source§

fn leave_variable_definition( &mut self, _ctx: &mut Context, _var_def: &'a VariableDefinition<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a VariableDefinition node and its child nodes were visited.
Source§

fn leave_selection_set( &mut self, _ctx: &mut Context, _selection_set: &'a SelectionSet<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a SelectionSet node and its child nodes were visited.
Source§

fn enter_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a FragmentSpread node is visited and before its child nodes are visited.
Source§

fn leave_fragment_spread( &mut self, _ctx: &mut Context, _fragment_spread: &'a FragmentSpread<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a FragmentSpread node and its child nodes were visited.
Source§

fn enter_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an InlineFragment node is visited and before its child nodes are visited.
Source§

fn leave_inline_fragment( &mut self, _ctx: &mut Context, _inline_fragment: &'a InlineFragment<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an InlineFragment node and its child nodes were visited.
Source§

fn enter_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when a Field node is visited and before its child nodes are visited.
Source§

fn leave_field( &mut self, _ctx: &mut Context, _field: &'a Field<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Field node and its child nodes were visited.
Source§

fn leave_directive( &mut self, _ctx: &mut Context, _directive: &'a Directive<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after a Directive node and its child nodes were visited.
Source§

fn enter_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called when an Argument node is visited and before its child nodes are visited.
Source§

fn leave_argument( &mut self, _ctx: &mut Context, _argument: &'a Argument<'a>, _info: &VisitInfo, ) -> VisitFlow

Called after an Argument node and its child nodes were visited.

Auto Trait Implementations§

§

impl<'a> Freeze for ValidationContext<'a>

§

impl<'a> !RefUnwindSafe for ValidationContext<'a>

§

impl<'a> !Send for ValidationContext<'a>

§

impl<'a> !Sync for ValidationContext<'a>

§

impl<'a> Unpin for ValidationContext<'a>

§

impl<'a> !UnwindSafe for ValidationContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.