#[non_exhaustive]pub enum Error {
Syntax {
message: String,
start: Pos,
end: Option<Pos>,
},
MultipleRoots {
root: OperationType,
schema: Pos,
pos: Pos,
},
MissingQueryRoot {
pos: Pos,
},
MultipleOperations {
anonymous: Pos,
operation: Pos,
},
OperationDuplicated {
operation: Name,
first: Pos,
second: Pos,
},
FragmentDuplicated {
fragment: Name,
first: Pos,
second: Pos,
},
MissingOperation,
RecursionLimitExceeded,
}
Expand description
Parser error.
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.
Syntax
A syntax error occurred.
Fields
MultipleRoots
The schema contained multiple query, mutation or subscription roots.
Fields
§
root: OperationType
The type of root that was duplicated.
MissingQueryRoot
The schema contained no query root.
MultipleOperations
Multiple operations were found in a document with an anonymous one.
Fields
OperationDuplicated
An operation is defined multiple times in a document.
Fields
FragmentDuplicated
A fragment is defined multiple times in a document.
Fields
MissingOperation
The document does not contain any operation.
RecursionLimitExceeded
Recursion limit exceeded.
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.81.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.81.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.