pub struct RuleNodeView<'tree> { /* private fields */ }Implementations§
Source§impl<'tree> RuleNodeView<'tree>
impl<'tree> RuleNodeView<'tree>
pub const fn node(self) -> Node<'tree>
pub fn rule_index(self) -> usize
pub fn invoking_state(self) -> isize
pub fn alt_number(self) -> usize
pub fn start(self) -> Option<TokenView<'tree>>
pub fn start_id(self) -> Option<TokenId>
pub fn stop(self) -> Option<TokenView<'tree>>
pub fn stop_id(self) -> Option<TokenId>
pub fn children(self) -> NodeChildren<'tree> ⓘ
pub fn child_count(self) -> usize
pub fn child_rule(self, rule_index: usize) -> Option<Self>
pub fn child_rules( self, rule_index: usize, ) -> impl DoubleEndedIterator<Item = Self> + 'tree
pub fn child_rule_trees( self, rule_index: usize, ) -> impl DoubleEndedIterator<Item = Node<'tree>> + 'tree
pub fn child_token(self, token_type: i32) -> Option<TerminalNodeView<'tree>>
pub fn child_tokens( self, token_type: i32, ) -> impl DoubleEndedIterator<Item = TerminalNodeView<'tree>> + 'tree
pub fn terminal_children( self, ) -> impl DoubleEndedIterator<Item = TerminalNodeView<'tree>> + 'tree
pub fn has_token(self, token_type: i32) -> bool
pub fn text(self) -> String
pub fn int_return(self, name: &str) -> Option<i64>
pub fn generated_attrs<T: Any>(self) -> Option<&'tree T>
pub fn exception(self) -> Option<&'tree AntlrError>
pub fn downcast_ref<T: FromRuleNode<'tree>>(self) -> Option<T>
pub fn invocation_states(self) -> impl Iterator<Item = isize> + 'tree
pub fn to_string_tree_with_names<S: AsRef<str>>( self, rule_names: &[S], ) -> String
pub fn to_string_tree<R: Recognizer>(self, recognizer: Option<&R>) -> String
Trait Implementations§
Source§impl<'tree> Clone for RuleNodeView<'tree>
impl<'tree> Clone for RuleNodeView<'tree>
Source§fn clone(&self) -> RuleNodeView<'tree>
fn clone(&self) -> RuleNodeView<'tree>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'tree> Copy for RuleNodeView<'tree>
Auto Trait Implementations§
impl<'tree> !RefUnwindSafe for RuleNodeView<'tree>
impl<'tree> !Send for RuleNodeView<'tree>
impl<'tree> !Sync for RuleNodeView<'tree>
impl<'tree> !UnwindSafe for RuleNodeView<'tree>
impl<'tree> Freeze for RuleNodeView<'tree>
impl<'tree> Unpin for RuleNodeView<'tree>
impl<'tree> UnsafeUnpin for RuleNodeView<'tree>
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