pub struct TypedParserToken<'a, G: TypedGrammar> { /* private fields */ }Expand description
Token captured from a parsed statement, typed by grammar G.
Returned by super::TypedParsedStatement::tokens. Requires
collect_tokens: true in super::ParserConfig.
Implementations§
Source§impl<'a, G: TypedGrammar> TypedParserToken<'a, G>
impl<'a, G: TypedGrammar> TypedParserToken<'a, G>
Sourcepub fn token_type(&self) -> G::Token
pub fn token_type(&self) -> G::Token
Grammar-typed token variant.
Sourcepub fn flags(&self) -> ParserTokenFlags
pub fn flags(&self) -> ParserTokenFlags
Semantic usage flags inferred by the parser.
Trait Implementations§
Source§impl<'a, G: Clone + TypedGrammar> Clone for TypedParserToken<'a, G>
impl<'a, G: Clone + TypedGrammar> Clone for TypedParserToken<'a, G>
Source§fn clone(&self) -> TypedParserToken<'a, G>
fn clone(&self) -> TypedParserToken<'a, G>
Returns a duplicate 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<'a, G: Debug + TypedGrammar> Debug for TypedParserToken<'a, G>
impl<'a, G: Debug + TypedGrammar> Debug for TypedParserToken<'a, G>
impl<'a, G: Copy + TypedGrammar> Copy for TypedParserToken<'a, G>
Auto Trait Implementations§
impl<'a, G> Freeze for TypedParserToken<'a, G>
impl<'a, G> RefUnwindSafe for TypedParserToken<'a, G>
impl<'a, G> Send for TypedParserToken<'a, G>
impl<'a, G> Sync for TypedParserToken<'a, G>
impl<'a, G> Unpin for TypedParserToken<'a, G>
impl<'a, G> UnsafeUnpin for TypedParserToken<'a, G>
impl<'a, G> UnwindSafe for TypedParserToken<'a, G>
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