docling_core/lib.rs
1//! Core data model for docling.rs.
2//!
3//! This crate is the Rust counterpart of the `docling-core` Python package: it
4//! owns the unified [`DoclingDocument`] representation that every backend
5//! produces and every serializer consumes. Keeping it dependency-light and
6//! separate from the conversion logic mirrors the Python split between
7//! `docling-core` (the schema) and `docling` (the converters).
8//!
9//! Phase 0 models a simplified, linear node tree that is enough to round-trip
10//! through Markdown. The faithful, `$ref`-based schema that matches
11//! docling-core's JSON wire format lands in Phase 1 (see `docs/MIGRATION.md`).
12
13pub mod base64;
14pub mod chunker;
15mod doclang;
16pub mod doctags;
17mod document;
18mod json;
19mod labels;
20mod markdown;
21
22pub use doclang::inline_runs_from_markdown;
23pub use document::{
24 inline_paragraph_node, ContentLayer, DoclingDocument, FieldItem, InlineRun, ListItemDclx, Node,
25 PictureClass, PictureImage, Script, Table, TableStructure,
26};
27pub use labels::DocItemLabel;
28pub use markdown::{ImageMode, MarkdownStreamer};