pub struct NodeInfo {
pub kind: Cow<'static, str>,
pub is_named: bool,
pub start_byte: usize,
pub end_byte: usize,
pub start_row: usize,
pub start_col: usize,
pub end_row: usize,
pub end_col: usize,
pub named_child_count: usize,
pub is_error: bool,
pub is_missing: bool,
}Expand description
Lightweight snapshot of a tree-sitter node’s properties.
Contains only primitive types for easy cross-language serialization.
This is an owned type that can be passed across FFI boundaries, unlike
tree_sitter::Node which borrows from the tree.
Fields§
§kind: Cow<'static, str>The grammar type name (e.g., “function_definition”, “identifier”).
is_named: boolWhether this is a named node (vs anonymous like punctuation).
start_byte: usizeStart byte offset in source.
end_byte: usizeEnd byte offset in source.
start_row: usizeStart row (zero-indexed).
start_col: usizeStart column (zero-indexed).
end_row: usizeEnd row (zero-indexed).
end_col: usizeEnd column (zero-indexed).
named_child_count: usizeNumber of named children.
is_error: boolWhether this node is an ERROR node.
is_missing: boolWhether this node is a MISSING node.
Trait Implementations§
impl Eq for NodeInfo
impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
impl Freeze for NodeInfo
impl RefUnwindSafe for NodeInfo
impl Send for NodeInfo
impl Sync for NodeInfo
impl Unpin for NodeInfo
impl UnsafeUnpin for NodeInfo
impl UnwindSafe for NodeInfo
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