pub struct Ast<'a, T> { /* private fields */ }Implementations§
Source§impl<'a, T> Ast<'a, T>
impl<'a, T> Ast<'a, T>
pub fn root(&self) -> &T
pub fn into_root(self) -> T
pub fn source(&self) -> &str
pub fn errors(&self) -> Iter<'_, Error>
Sourcepub fn comments(&self) -> &[Span]
pub fn comments(&self) -> &[Span]
Comment token spans in document order.
GraphQL comments are always line comments: each span covers # through
the end of the line (excluding the line terminator).
NOTE: Only comments consumed while parsing are recorded.
Parser::parse reads to the end of input, so it collects every comment in the source.
Partial roots (Parser::parse_selection_set, Parser::parse_type)
stop at the end of the root, so comments past it are not included.
pub fn recursion_limit(&self) -> LimitTracker
pub fn token_limit(&self) -> LimitTracker
Source§impl<'a> Ast<'a, SelectionSet<'a>>
impl<'a> Ast<'a, SelectionSet<'a>>
pub fn field_set(&self) -> &SelectionSet<'a>
Trait Implementations§
Source§impl<'a, T: PartialEq> PartialEq for Ast<'a, T>
impl<'a, T: PartialEq> PartialEq for Ast<'a, T>
impl<'a, T: PartialEq> StructuralPartialEq for Ast<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for Ast<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for Ast<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Ast<'a, T>where
T: Send,
impl<'a, T> Sync for Ast<'a, T>where
T: Sync,
impl<'a, T> Unpin for Ast<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for Ast<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for Ast<'a, T>where
T: UnwindSafe,
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