pub struct TreeItem {
pub parent: Option<usize>,
pub children: Vec<usize>,
pub layer: Option<ContentLayer>,
pub kind: TreeKind,
pub prov: Option<TreeProv>,
pub comments: Vec<usize>,
pub source: Option<TreeTrack>,
pub deleted: bool,
pub notes: Vec<TreeNote>,
pub note_body: bool,
}Expand description
One item of an ItemTree.
Fields§
§parent: Option<usize>The parent item’s index; None = the document body.
children: Vec<usize>Child item indices, in docling’s children order.
layer: Option<ContentLayer>The content layer; None = body.
kind: TreeKind§prov: Option<TreeProv>The item’s prov entry, when the backend has page geometry for it
(None → prov: [], what the HTML and DOCX backends write).
comments: Vec<usize>docling’s DocItem.comments: the comment_section groups (or note
text items) annotating this item, as item indices — written after
prov when non-empty.
source: Option<TreeTrack>docling’s DocItem.source: the track segment a text item was taken
from (WebVTT cues) — written after prov when set.
deleted: boolRemoved by ItemTree::delete (docling’s delete_items): the slot
stays so every other index keeps its meaning, but the item is not
numbered or written.
notes: Vec<TreeNote>Footnotes / endnotes referenced from inside this text item (#538): the
note call’s position (chars into the item’s text) and the note’s text.
docling keeps notes as unlinked furniture footnote items, so the
JSON never shows this; the Pandoc AST writes each as a Note there.
note_body: boolThis furniture footnote item is the body of a note some text item
calls (it travels in that item’s Self::notes); the Pandoc AST then
leaves it out as a standalone block.