pub struct TreeNode {Show 13 fields
pub title: String,
pub structure: String,
pub content: String,
pub summary: String,
pub depth: usize,
pub start_index: usize,
pub end_index: usize,
pub start_page: Option<usize>,
pub end_page: Option<usize>,
pub node_id: Option<String>,
pub physical_index: Option<String>,
pub token_count: Option<usize>,
pub references: Vec<NodeReference>,
}Expand description
A node in the Vectorless document tree.
Each branch represents a section and each leaf contains the actual text. When a question is asked, an LLM navigates this tree level by level to find the right answer.
Fields§
§title: StringTitle of this section.
structure: StringHierarchical structure index (e.g., “1”, “1.1”, “1.2.3”).
This provides a human-readable path to the node and is useful for:
- LLM navigation (easier to understand “go to section 2.1.3”)
- Table of contents display
- Cross-referencing
content: StringRaw text content (populated at leaves).
summary: StringGenerated by LLM summary.
depth: usizeDepth in tree (0 = root, 1 = section, 2 = subsection, etc.).
start_index: usizeStarting line number (1-based).
end_index: usizeEnding line number (1-based).
start_page: Option<usize>Starting page number (1-based, if applicable).
end_page: Option<usize>Ending page number (1-based, if applicable).
node_id: Option<String>Unique node identifier (e.g., “0001”, “0002”).
physical_index: Option<String>Physical index marker for line tracking.
token_count: Option<usize>Token count estimate.
references: Vec<NodeReference>References found in this node’s content.
These are in-document references like “see Appendix G” or “refer to Table 5.3” that can be followed during retrieval.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TreeNode
impl<'de> Deserialize<'de> for TreeNode
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>,
Auto Trait Implementations§
impl Freeze for TreeNode
impl RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin for TreeNode
impl UnwindSafe for TreeNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more