pub struct SemanticNode {
pub text: String,
pub importance: f64,
pub children: Vec<SemanticNode>,
pub tokens: usize,
}Expand description
A node in the semantic document tree.
Fields§
§text: StringThe text content of this node.
importance: f64Importance score (higher = more important).
children: Vec<SemanticNode>Child nodes.
tokens: usizeApproximate token count for this node’s text.
Implementations§
Source§impl SemanticNode
impl SemanticNode
Sourcepub fn total_tokens(&self) -> usize
pub fn total_tokens(&self) -> usize
Total tokens in this subtree (self + all descendants).
Trait Implementations§
Source§impl Clone for SemanticNode
impl Clone for SemanticNode
Auto Trait Implementations§
impl Freeze for SemanticNode
impl RefUnwindSafe for SemanticNode
impl Send for SemanticNode
impl Sync for SemanticNode
impl Unpin for SemanticNode
impl UnsafeUnpin for SemanticNode
impl UnwindSafe for SemanticNode
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