Struct tree_sitter::Node
source · pub struct Node<'a>(_, _);
Implementations
sourceimpl<'tree> Node<'tree>
impl<'tree> Node<'tree>
pub fn kind_id(&self) -> u16
pub fn kind(&self) -> &'static str
pub fn is_named(&self) -> bool
pub fn has_changes(&self) -> bool
pub fn has_error(&self) -> bool
pub fn start_byte(&self) -> usize
pub fn end_byte(&self) -> usize
pub fn range(&self) -> Range
pub fn start_position(&self) -> Point
pub fn end_position(&self) -> Point
pub fn child(&self, i: usize) -> Option<Self>
pub fn child_count(&self) -> usize
pub fn children<'a>(&'a self) -> impl Iterator<Item = Node<'tree>> + 'a
pub fn named_child<'a>(&'a self, i: usize) -> Option<Self>
pub fn named_child_count(&self) -> usize
pub fn parent(&self) -> Option<Self>
pub fn next_sibling(&self) -> Option<Self>
pub fn prev_sibling(&self) -> Option<Self>
pub fn next_named_sibling(&self) -> Option<Self>
pub fn prev_named_sibling(&self) -> Option<Self>
pub fn to_sexp(&self) -> String
pub fn utf8_text<'a>(&self, source: &'a str) -> Result<&'a str, Utf8Error>
pub fn utf16_text<'a>(&self, source: &'a [u16]) -> &'a [u16]
pub fn walk(&self) -> TreeCursor<'tree>
Trait Implementations
impl<'a> Copy for Node<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Node<'a>
impl<'a> !Send for Node<'a>
impl<'a> !Sync for Node<'a>
impl<'a> Unpin for Node<'a>
impl<'a> UnwindSafe for Node<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more