pub struct TreeNode {
pub id: NodeId,
pub content: String,
pub summary: String,
pub level: usize,
pub children: Vec<NodeId>,
pub parent: Option<NodeId>,
pub chunk_ids: Vec<ChunkId>,
pub keywords: Vec<String>,
pub start_offset: usize,
pub end_offset: usize,
}Expand description
A node in the hierarchical document tree
Fields§
§id: NodeIdUnique identifier for this node
content: StringFull text content of this node
summary: StringGenerated summary of the content
level: usizeLevel in the tree hierarchy (0 = leaf, higher = more abstract)
children: Vec<NodeId>IDs of child nodes in the tree
parent: Option<NodeId>ID of the parent node, if any
chunk_ids: Vec<ChunkId>IDs of text chunks represented by this node
keywords: Vec<String>Extracted keywords from the content
start_offset: usizeStarting character offset in the original document
end_offset: usizeEnding character offset in the original document
Trait Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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