pub enum Node {
Heading {
level: u8,
text: String,
},
Paragraph {
text: String,
},
ListItem {
ordered: bool,
number: u64,
first_in_list: bool,
text: String,
level: u8,
},
Code {
language: Option<String>,
text: String,
},
Table(Table),
Picture {
caption: Option<String>,
image: Option<PictureImage>,
},
Group {
label: String,
children: Vec<Node>,
},
FieldRegion {
items: Vec<FieldItem>,
},
}Expand description
A single piece of document content.
Variants§
Heading
A heading. level is 1-6.
Paragraph
A run of body text.
ListItem
A single list item at the given nesting level (0 = top). For ordered
items, number is the display number (honoring the list’s start); it
is unused for unordered items. first_in_list marks the first item of a
list so the serializer can blank-line-separate adjacent sibling lists.
Code
A fenced code block.
Table(Table)
A table. The first row is treated as the header.
Picture
A picture/figure, with an optional caption and (when a backend extracts it) the embedded image itself.
Group
A logical grouping of child nodes (e.g. a list, a section).
FieldRegion
A form key-value region (docling’s field_region): a set of form fields,
each pairing an optional marker, key, and value. Backends detect these
from form structure (e.g. HTML’s keyN / keyN_valueM / keyN_marker
id-convention); the serializers render each item’s parts as separate
labelled texts (marker / field_key / field_value).