pub trait SimpleFolder<'a> {
Show 16 methods
// Provided methods
fn operation(
&mut self,
operation: OperationDefinition<'a>,
) -> OperationDefinition<'a> { ... }
fn fragment(
&mut self,
fragment: FragmentDefinition<'a>,
) -> FragmentDefinition<'a> { ... }
fn variable_definitions(
&mut self,
var_defs: VariableDefinitions<'a>,
) -> VariableDefinitions<'a> { ... }
fn variable_definition(
&mut self,
var_def: VariableDefinition<'a>,
) -> VariableDefinition<'a> { ... }
fn selection_set(
&mut self,
selection_set: SelectionSet<'a>,
) -> SelectionSet<'a> { ... }
fn fragment_spread(
&mut self,
fragment_spread: FragmentSpread<'a>,
) -> FragmentSpread<'a> { ... }
fn inline_fragment(
&mut self,
inline_fragment: InlineFragment<'a>,
) -> InlineFragment<'a> { ... }
fn field(&mut self, field: Field<'a>) -> Field<'a> { ... }
fn directives(&mut self, directives: Directives<'a>) -> Directives<'a> { ... }
fn directive(&mut self, directive: Directive<'a>) -> Directive<'a> { ... }
fn arguments(&mut self, arguments: Arguments<'a>) -> Arguments<'a> { ... }
fn argument(&mut self, argument: Argument<'a>) -> Argument<'a> { ... }
fn value(&mut self, value: Value<'a>) -> Value<'a> { ... }
fn of_type(&mut self, of_type: Type<'a>) -> Type<'a> { ... }
fn variable(&mut self, var: Variable<'a>) -> Variable<'a> { ... }
fn named_type(&mut self, name: NamedType<'a>) -> NamedType<'a> { ... }
}
Expand description
This trait is a simplified version of the Folder trait for ease of use.
All structures implementing SimpleFolder
automatically implement the Folder
trait.
Its callbacks don’t receive the AST Context and only return the AST Nodes themselves a Result
having to wrap them.
Provided Methods§
Sourcefn operation(
&mut self,
operation: OperationDefinition<'a>,
) -> OperationDefinition<'a>
fn operation( &mut self, operation: OperationDefinition<'a>, ) -> OperationDefinition<'a>
Folds an OperationDefinition
into a new node as part of a new, transformed AST.
Sourcefn fragment(
&mut self,
fragment: FragmentDefinition<'a>,
) -> FragmentDefinition<'a>
fn fragment( &mut self, fragment: FragmentDefinition<'a>, ) -> FragmentDefinition<'a>
Folds a FragmentDefinition
into a new node as part of a new, transformed AST.
Sourcefn variable_definitions(
&mut self,
var_defs: VariableDefinitions<'a>,
) -> VariableDefinitions<'a>
fn variable_definitions( &mut self, var_defs: VariableDefinitions<'a>, ) -> VariableDefinitions<'a>
Folds a VariableDefinitions
node into a new node as part of a new, transformed AST.
Sourcefn variable_definition(
&mut self,
var_def: VariableDefinition<'a>,
) -> VariableDefinition<'a>
fn variable_definition( &mut self, var_def: VariableDefinition<'a>, ) -> VariableDefinition<'a>
Folds a VariableDefinition
into a new node as part of a new, transformed AST.
Sourcefn selection_set(&mut self, selection_set: SelectionSet<'a>) -> SelectionSet<'a>
fn selection_set(&mut self, selection_set: SelectionSet<'a>) -> SelectionSet<'a>
Folds a SelectionSet
into a new node as part of a new, transformed AST.
Sourcefn fragment_spread(
&mut self,
fragment_spread: FragmentSpread<'a>,
) -> FragmentSpread<'a>
fn fragment_spread( &mut self, fragment_spread: FragmentSpread<'a>, ) -> FragmentSpread<'a>
Folds a FragmentSpread
node into a new node as part of a new, transformed AST.
Sourcefn inline_fragment(
&mut self,
inline_fragment: InlineFragment<'a>,
) -> InlineFragment<'a>
fn inline_fragment( &mut self, inline_fragment: InlineFragment<'a>, ) -> InlineFragment<'a>
Folds an InlineFragment
into a new node as part of a new, transformed AST.
Sourcefn field(&mut self, field: Field<'a>) -> Field<'a>
fn field(&mut self, field: Field<'a>) -> Field<'a>
Folds a Field into a new node as part of a new, transformed AST.
Sourcefn directives(&mut self, directives: Directives<'a>) -> Directives<'a>
fn directives(&mut self, directives: Directives<'a>) -> Directives<'a>
Folds a Directives node into a new node as part of a new, transformed AST.
Sourcefn directive(&mut self, directive: Directive<'a>) -> Directive<'a>
fn directive(&mut self, directive: Directive<'a>) -> Directive<'a>
Folds a Directive into a new node as part of a new, transformed AST.
Sourcefn arguments(&mut self, arguments: Arguments<'a>) -> Arguments<'a>
fn arguments(&mut self, arguments: Arguments<'a>) -> Arguments<'a>
Folds a Arguments node into a new node as part of a new, transformed AST.
Sourcefn argument(&mut self, argument: Argument<'a>) -> Argument<'a>
fn argument(&mut self, argument: Argument<'a>) -> Argument<'a>
Folds an Argument into a new node as part of a new, transformed AST.
Sourcefn value(&mut self, value: Value<'a>) -> Value<'a>
fn value(&mut self, value: Value<'a>) -> Value<'a>
Folds a Value node into a new node as part of a new, transformed AST.
Sourcefn of_type(&mut self, of_type: Type<'a>) -> Type<'a>
fn of_type(&mut self, of_type: Type<'a>) -> Type<'a>
Folds a Type node into a new node as part of a new, transformed AST.
Sourcefn variable(&mut self, var: Variable<'a>) -> Variable<'a>
fn variable(&mut self, var: Variable<'a>) -> Variable<'a>
Folds a Variable node into a new node as part of a new, transformed AST.
Sourcefn named_type(&mut self, name: NamedType<'a>) -> NamedType<'a>
fn named_type(&mut self, name: NamedType<'a>) -> NamedType<'a>
Folds a NamedType
node into a new node as part of a new, transformed AST.