NoFragmentsCycle

Struct NoFragmentsCycle 

Source
pub struct NoFragmentsCycle { /* private fields */ }
Expand description

No fragment cycles

The graph of fragment spreads must not form any cycles including spreading itself. Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data.

https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles

Implementations§

Source§

impl NoFragmentsCycle

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Default for NoFragmentsCycle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a> OperationVisitor<'a, ValidationErrorContext> for NoFragmentsCycle

Source§

fn enter_fragment_definition( &mut self, visitor_context: &mut OperationVisitorContext<'_>, user_context: &mut ValidationErrorContext, fragment: &FragmentDefinition, )

Source§

fn enter_document( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a Document, )

Source§

fn leave_document( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Document, )

Source§

fn enter_operation_definition( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a OperationDefinition, )

Source§

fn leave_operation_definition( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &OperationDefinition, )

Source§

fn leave_fragment_definition( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &FragmentDefinition, )

Source§

fn enter_variable_definition( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a VariableDefinition, )

Source§

fn leave_variable_definition( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &VariableDefinition, )

Source§

fn enter_directive( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Directive, )

Source§

fn leave_directive( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Directive, )

Source§

fn enter_argument( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a (String, Value), )

Source§

fn leave_argument( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &(String, Value), )

Source§

fn enter_selection_set( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a SelectionSet, )

Source§

fn leave_selection_set( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &SelectionSet, )

Source§

fn enter_field( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Field, )

Source§

fn leave_field( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Field, )

Source§

fn enter_fragment_spread( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a FragmentSpread, )

Source§

fn leave_fragment_spread( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &FragmentSpread, )

Source§

fn enter_inline_fragment( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &InlineFragment, )

Source§

fn leave_inline_fragment( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &InlineFragment, )

Source§

fn enter_null_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: (), )

Source§

fn leave_null_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: (), )

Source§

fn enter_scalar_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Value, )

Source§

fn leave_scalar_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Value, )

Source§

fn enter_enum_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &String, )

Source§

fn leave_enum_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &String, )

Source§

fn enter_variable_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &'a str, )

Source§

fn leave_variable_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &String, )

Source§

fn enter_list_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Vec<Value>, )

Source§

fn leave_list_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &Vec<Value>, )

Source§

fn enter_object_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &BTreeMap<String, Value>, )

Source§

fn leave_object_value( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &BTreeMap<String, Value>, )

Source§

fn enter_object_field( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &(String, Value), )

Source§

fn leave_object_field( &mut self, _: &mut OperationVisitorContext<'a>, _: &mut UserContext, _: &(String, Value), )

Source§

impl ValidationRule for NoFragmentsCycle

Source§

fn error_code<'a>(&self) -> &'a str

Source§

fn validate( &self, ctx: &mut OperationVisitorContext<'_>, error_collector: &mut ValidationErrorContext, )

Auto Trait Implementations§

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.