Struct apollo_parser::Lexer
source · [−]pub struct Lexer { /* private fields */ }
Expand description
Parses tokens into text.
use apollo_parser::Lexer;
let query = "
{
animal
...snackSelection
... on Pet {
playmates {
count
}
}
}
";
let lexer = Lexer::new(query);
assert_eq!(lexer.errors().len(), 0);
let tokens = lexer.tokens();
Implementations
Auto Trait Implementations
impl RefUnwindSafe for Lexer
impl Send for Lexer
impl Sync for Lexer
impl Unpin for Lexer
impl UnwindSafe for Lexer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more