Enum async_graphql_parser::Error [−][src]
#[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, }
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.
A syntax error occurred.
Show fields
The schema contained multiple query, mutation or subscription roots.
Show fields
Fields of MultipleRoots
root: OperationType
The type of root that was duplicated.
schema: Pos
The position of the schema.
pos: Pos
The position of the second root.
The schema contained no query root.
Show fields
Fields of MissingQueryRoot
pos: Pos
The position of the schema.
Multiple operations were found in a document with an anonymous one.
Show fields
An operation is defined multiple times in a document.
Show fields
A fragment is defined multiple times in a document.
Show fields
The document does not contain any operation.
Implementations
pub fn positions(&self) -> ErrorPositionsⓘNotable traits for ErrorPositions
impl Iterator for ErrorPositions type Item = Pos;
[src]
pub fn positions(&self) -> ErrorPositionsⓘNotable traits for ErrorPositions
impl Iterator for ErrorPositions type Item = Pos;
[src]Get an iterator over the positions of the error.
The iterator is ordered from most important to least important position.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more