#[non_exhaustive]pub enum DiagnosticData {
Show 47 variants
SyntaxError {
message: String,
},
LimitExceeded {
message: String,
},
MissingIdent,
ExecutableDefinition {
kind: &'static str,
},
UniqueDefinition {
ty: &'static str,
name: String,
original_definition: DiagnosticLocation,
redefined_definition: DiagnosticLocation,
},
UniqueArgument {
name: String,
original_definition: DiagnosticLocation,
redefined_definition: DiagnosticLocation,
},
UniqueInputValue {
name: String,
original_value: DiagnosticLocation,
redefined_value: DiagnosticLocation,
},
SingleRootField {
fields: usize,
subscription: DiagnosticLocation,
},
UnsupportedOperation {
ty: &'static str,
},
UndefinedField {
field: String,
ty: String,
},
UndefinedArgument {
name: String,
},
UndefinedDefinition {
name: String,
},
UndefinedDirective {
name: String,
},
UndefinedVariable {
name: String,
},
UndefinedFragment {
name: String,
},
UndefinedValue {
value: String,
definition: String,
},
WrongTypeExtension {
name: String,
definition: DiagnosticLocation,
extension: DiagnosticLocation,
},
RecursiveDirectiveDefinition {
name: String,
},
RecursiveInterfaceDefinition {
name: String,
},
RecursiveInputObjectDefinition {
name: String,
},
RecursiveFragmentDefinition {
name: String,
},
CapitalizedValue {
value: String,
},
UniqueField {
field: String,
original_definition: DiagnosticLocation,
redefined_definition: DiagnosticLocation,
},
MissingField {
field: String,
},
RequiredArgument {
name: String,
},
DuplicateImplementsInterface {
ty: String,
interface: String,
},
TransitiveImplementedInterfaces {
missing_interface: String,
},
OutputType {
name: String,
ty: &'static str,
},
InputType {
name: String,
ty: &'static str,
},
ScalarSpecificationURL,
QueryRootOperationType,
BuiltInScalarDefinition,
UnusedVariable {
name: String,
},
ObjectType {
name: String,
ty: &'static str,
},
UnsupportedLocation {
name: String,
dir_loc: DirectiveLocation,
directive_def: DiagnosticLocation,
},
UnsupportedValueType {
value: String,
ty: String,
},
IntCoercionError {
value: String,
},
UniqueDirective {
name: String,
original_call: DiagnosticLocation,
conflicting_call: DiagnosticLocation,
},
IntrospectionField {
field: String,
},
DisallowedSubselection,
MissingSubselection,
ConflictingField {
field: String,
original_selection: DiagnosticLocation,
redefined_selection: DiagnosticLocation,
},
InvalidFragment {
ty: Option<String>,
},
InvalidFragmentTarget {
ty: String,
},
InvalidFragmentSpread {
name: Option<String>,
type_name: String,
},
UnusedFragment {
name: String,
},
DisallowedVariableUsage {
var_name: String,
arg_name: String,
},
}
Expand description
Structured data about a diagnostic.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SyntaxError
LimitExceeded
MissingIdent
ExecutableDefinition
UniqueDefinition
UniqueArgument
UniqueInputValue
SingleRootField
UnsupportedOperation
UndefinedField
UndefinedArgument
UndefinedDefinition
UndefinedDirective
UndefinedVariable
UndefinedFragment
UndefinedValue
WrongTypeExtension
Fields
§
definition: DiagnosticLocation
Location of the original definition. This may be None when extending a builtin GraphQL type.
§
extension: DiagnosticLocation
Location of the extension
RecursiveDirectiveDefinition
RecursiveInterfaceDefinition
RecursiveInputObjectDefinition
RecursiveFragmentDefinition
CapitalizedValue
UniqueField
MissingField
RequiredArgument
DuplicateImplementsInterface
TransitiveImplementedInterfaces
OutputType
InputType
ScalarSpecificationURL
QueryRootOperationType
BuiltInScalarDefinition
UnusedVariable
ObjectType
UnsupportedLocation
Fields
§
dir_loc: DirectiveLocation
current location where the directive is used
§
directive_def: DiagnosticLocation
The source location where the directive that’s being used was defined.
UnsupportedValueType
IntCoercionError
UniqueDirective
IntrospectionField
DisallowedSubselection
MissingSubselection
ConflictingField
InvalidFragment
InvalidFragmentTarget
InvalidFragmentSpread
Fields
UnusedFragment
DisallowedVariableUsage
Implementations§
Trait Implementations§
source§impl Clone for DiagnosticData
impl Clone for DiagnosticData
source§fn clone(&self) -> DiagnosticData
fn clone(&self) -> DiagnosticData
Returns a copy 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 DiagnosticData
impl Debug for DiagnosticData
source§impl Display for DiagnosticData
impl Display for DiagnosticData
source§impl Error for DiagnosticData
impl Error for DiagnosticData
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl Hash for DiagnosticData
impl Hash for DiagnosticData
source§impl PartialEq<DiagnosticData> for DiagnosticData
impl PartialEq<DiagnosticData> for DiagnosticData
source§fn eq(&self, other: &DiagnosticData) -> bool
fn eq(&self, other: &DiagnosticData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DiagnosticData
impl StructuralEq for DiagnosticData
impl StructuralPartialEq for DiagnosticData
Auto Trait Implementations§
impl RefUnwindSafe for DiagnosticData
impl Send for DiagnosticData
impl Sync for DiagnosticData
impl Unpin for DiagnosticData
impl UnwindSafe for DiagnosticData
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.