Struct tree_sitter_facade::Node
source · [−]pub struct Node<'tree> { /* private fields */ }
Implementations
sourceimpl<'tree> Node<'tree>
impl<'tree> Node<'tree>
pub fn byte_range(&self) -> Range<u32>
pub fn child(&self, i: u32) -> Option<Self>
pub fn child_by_field_id(&self, field_id: u16) -> Option<Self>
pub fn child_by_field_name(&self, field_name: impl AsRef<[u8]>) -> Option<Self>
pub fn child_count(&self) -> u32
pub fn children<'a>(
&self,
cursor: &'a mut TreeCursor<'tree>
) -> impl ExactSizeIterator<Item = Node<'tree>> + 'a
pub fn children_by_field_id<'a>(
&self,
field_id: u16,
cursor: &'a mut TreeCursor<'tree>
) -> impl Iterator<Item = Node<'tree>> + 'a
pub fn children_by_field_name<'a>(
&self,
field_name: &str,
cursor: &'a mut TreeCursor<'tree>
) -> impl Iterator<Item = Node<'tree>> + 'a
pub fn descendant_for_byte_range(&self, start: u32, end: u32) -> Option<Self>
pub fn descendant_for_point_range(&self, start: Point, end: Point) -> Option<Self>
pub fn edit(&mut self, edit: &InputEdit)
pub fn end_byte(&self) -> u32
pub fn end_position(&self) -> Point
pub fn has_changes(&self) -> bool
pub fn has_error(&self) -> bool
pub fn id(&self) -> usize
pub fn is_error(&self) -> bool
pub fn is_extra(&self) -> bool
pub fn is_missing(&self) -> bool
pub fn is_named(&self) -> bool
pub fn kind(&self) -> Cow<'_, str>
pub fn kind_id(&self) -> u16
pub fn language(&self) -> Language
pub fn named_child(&self, i: u32) -> Option<Self>
pub fn named_child_count(&self) -> u32
pub fn named_children<'a>(
&self,
cursor: &'a mut TreeCursor<'tree>
) -> impl ExactSizeIterator<Item = Node<'tree>> + 'a
pub fn named_descendant_for_byte_range(
&self,
start: u32,
end: u32
) -> Option<Self>
pub fn named_descendant_for_point_range(
&self,
start: Point,
end: Point
) -> Option<Self>
pub fn next_named_sibling(&self) -> Option<Self>
pub fn next_sibling(&self) -> Option<Self>
pub fn parent(&self) -> Option<Self>
pub fn prev_named_sibling(&self) -> Option<Self>
pub fn prev_sibling(&self) -> Option<Self>
pub fn range(&self) -> Range
pub fn start_byte(&self) -> u32
pub fn start_position(&self) -> Point
pub fn to_sexp(&self) -> Cow<'_, str>
pub fn utf8_text<'a>(&self, source: &'a [u8]) -> Result<Cow<'a, str>, Utf8Error>
pub fn utf16_text<'a>(&self, source: &'a [u16]) -> &'a [u16]
pub fn walk(&self) -> TreeCursor<'tree>
Trait Implementations
sourceimpl<'a> Ord for Node<'a>
impl<'a> Ord for Node<'a>
sourceimpl<'a> PartialOrd<Node<'a>> for Node<'a>
impl<'a> PartialOrd<Node<'a>> for Node<'a>
sourcefn partial_cmp(&self, that: &Node<'a>) -> Option<Ordering>
fn partial_cmp(&self, that: &Node<'a>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'tree> Eq for Node<'tree>
impl<'a> RefUnwindSafe for Node<'a>
impl<'tree> StructuralEq for Node<'tree>
impl<'tree> StructuralPartialEq for Node<'tree>
impl<'a> Unpin for Node<'a>
impl<'a> UnwindSafe for Node<'a>
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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