pub struct ValidatedRuleNode<'a, Grammar> { /* private fields */ }Expand description
A rule node borrowed from a ValidatedTree with the same Grammar
brand.
Implementations§
Source§impl<'a, Grammar> ValidatedRuleNode<'a, Grammar>
impl<'a, Grammar> ValidatedRuleNode<'a, Grammar>
pub const fn rule_node(self) -> RuleNodeView<'a>
pub const fn node(self) -> Node<'a>
pub fn rule_index(self) -> usize
pub fn text(self) -> String
Sourcepub fn downcast_ref<T: FromValidatedRuleNode<'a, Grammar = Grammar>>(
self,
) -> Option<T>
pub fn downcast_ref<T: FromValidatedRuleNode<'a, Grammar = Grammar>>( self, ) -> Option<T>
Views this node as one of the grammar’s validated context types.
The Grammar brand ties candidates to the grammar that produced the
node, so contexts of other generated parsers do not satisfy the bound.
Trait Implementations§
Source§impl<Grammar> Clone for ValidatedRuleNode<'_, Grammar>
impl<Grammar> Clone for ValidatedRuleNode<'_, Grammar>
impl<Grammar> Copy for ValidatedRuleNode<'_, Grammar>
Auto Trait Implementations§
impl<'a, Grammar> !RefUnwindSafe for ValidatedRuleNode<'a, Grammar>
impl<'a, Grammar> !Send for ValidatedRuleNode<'a, Grammar>
impl<'a, Grammar> !Sync for ValidatedRuleNode<'a, Grammar>
impl<'a, Grammar> !UnwindSafe for ValidatedRuleNode<'a, Grammar>
impl<'a, Grammar> Freeze for ValidatedRuleNode<'a, Grammar>
impl<'a, Grammar> Unpin for ValidatedRuleNode<'a, Grammar>where
Grammar: Unpin,
impl<'a, Grammar> UnsafeUnpin for ValidatedRuleNode<'a, Grammar>
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