pub trait NodeTrait<'a>: SourceRanged {
Show 28 methods fn parent(&self) -> Option<Node<'a>>; fn children(&self) -> Vec<Node<'a>, Global>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn as_node(&self) -> Node<'a>; fn kind(&self) -> NodeKind; fn ancestors(&self) -> AncestorIterator<'a>Notable traits for AncestorIterator<'a>impl<'a> Iterator for AncestorIterator<'a> type Item = Node<'a>; { ... } fn start_line(&self) -> usize { ... } fn end_line(&self) -> usize { ... } fn start_column(&self) -> usize { ... } fn end_column(&self) -> usize { ... } fn char_width(&self) -> usize { ... } fn child_index(&self) -> usize { ... } fn previous_sibling(&self) -> Option<Node<'a>> { ... } fn previous_siblings(&self) -> Vec<Node<'a>, Global>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... } fn next_sibling(&self) -> Option<Node<'a>> { ... } fn next_siblings(&self) -> Vec<Node<'a>, Global>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... } fn tokens(&self) -> &'a [TokenAndSpan] { ... } fn children_with_tokens(&self) -> Vec<NodeOrToken<'a>, Global>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... } fn children_with_tokens_fast(
        &self,
        program: &dyn RootNode<'a>
    ) -> Vec<NodeOrToken<'a>, Global>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
{ ... } fn leading_comments(&self) -> CommentsIterator<'a>Notable traits for CommentsIterator<'a>impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment; { ... } fn trailing_comments(&self) -> CommentsIterator<'a>Notable traits for CommentsIterator<'a>impl<'a> Iterator for CommentsIterator<'a> type Item = &'a Comment; { ... } fn program(&self) -> Program<'a> { ... } fn module(&self) -> &Module<'a> { ... } fn script(&self) -> &Script<'a> { ... } fn text(&self) -> &'a str { ... } fn previous_token(&self) -> Option<&'a TokenAndSpan> { ... } fn next_token(&self) -> Option<&'a TokenAndSpan> { ... } fn previous_tokens(&self) -> &'a [TokenAndSpan] { ... } fn next_tokens(&self) -> &'a [TokenAndSpan] { ... }
}

Required Methods

Provided Methods

Gets the previous siblings in the order they appear in the file.

Gets the next siblings in the order they appear in the file.

Gets the root node.

Gets the root node if the view was created from a Module; otherwise panics.

Gets the root node if the view was created from a Script; otherwise panics.

Gets the previous tokens in the order they appear in the file.

Gets the next tokens in the order they appear in the file.

Implementors