Skip to main content

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 latex;
24mod markdown;
25
26pub use confidence::{ConfidenceReport, PageConfidence, QualityGrade};
27pub use doclang::inline_runs_from_markdown;
28pub use document::{
29    inline_paragraph_node, ContentLayer, DoclingDocument, FieldItem, InlineRun, ListItemDclx, Node,
30    PictureClass, PictureImage, Script, Table, TableCell, TableStructure,
31};
32pub use labels::DocItemLabel;
33pub use markdown::{ImageMode, MarkdownStreamer};