pub struct NodeRef {
pub file: RelativePath,
pub start_byte: usize,
pub end_byte: usize,
pub kind: NodeKind,
pub line: usize,
pub column: usize,
pub end_line: usize,
pub end_column: usize,
}Expand description
A self-contained reference to a node in a source file.
Encodes everything needed to locate and re-parse the node: file path + byte range. Each MCP call receives and returns these.
Fields§
§file: RelativePathRelative path to the source file.
start_byte: usizeByte offset of the start of this node.
end_byte: usizeByte offset of the end of this node.
kind: NodeKindtree-sitter node kind (e.g. “function_declaration”, “class_declaration”).
line: usize1-based start line number.
column: usize0-based start column offset.
end_line: usize1-based end line number.
end_column: usize0-based end column offset.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeRef
impl<'de> Deserialize<'de> for NodeRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NodeRef
impl StructuralPartialEq for NodeRef
Auto Trait Implementations§
impl Freeze for NodeRef
impl RefUnwindSafe for NodeRef
impl Send for NodeRef
impl Sync for NodeRef
impl Unpin for NodeRef
impl UnsafeUnpin for NodeRef
impl UnwindSafe for NodeRef
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