pub enum ReservedNameContext {
FragmentName,
EnumValue,
}Expand description
Contexts where certain names are reserved in GraphQL.
Some names have special meaning in specific contexts and cannot be used
as identifiers there. This enum is used by GraphQLParseErrorKind::ReservedName
to indicate which context rejected the name.
Variants§
FragmentName
Fragment names cannot be on (it introduces the type condition).
Invalid: fragment on on User { ... }
The first on would be parsed as the fragment name, but on is
reserved in this context.
EnumValue
Enum values cannot be true, false, or null.
Invalid: enum Bool { true false } or enum Maybe { null some }
These would be ambiguous with boolean/null literals in value contexts.
Trait Implementations§
Source§impl Clone for ReservedNameContext
impl Clone for ReservedNameContext
Source§fn clone(&self) -> ReservedNameContext
fn clone(&self) -> ReservedNameContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReservedNameContext
impl Debug for ReservedNameContext
Source§impl PartialEq for ReservedNameContext
impl PartialEq for ReservedNameContext
impl Copy for ReservedNameContext
impl Eq for ReservedNameContext
impl StructuralPartialEq for ReservedNameContext
Auto Trait Implementations§
impl Freeze for ReservedNameContext
impl RefUnwindSafe for ReservedNameContext
impl Send for ReservedNameContext
impl Sync for ReservedNameContext
impl Unpin for ReservedNameContext
impl UnwindSafe for ReservedNameContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more