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 assets;
14pub mod base64;
15pub mod chunker;
16pub mod confidence;
17mod doclang;
18pub mod doctags;
19mod document;
20pub mod env;
21mod json;
22mod labels;
23mod markdown;
24
25pub use confidence::{ConfidenceReport, PageConfidence, QualityGrade};
26pub use doclang::inline_runs_from_markdown;
27pub use document::{
28 inline_paragraph_node, ContentLayer, DoclingDocument, FieldItem, InlineRun, ListItemDclx, Node,
29 PictureClass, PictureImage, Script, Table, TableCell, TableStructure,
30};
31pub use labels::DocItemLabel;
32pub use markdown::{ImageMode, MarkdownStreamer};