Skip to main content

termdoc_core/
lib.rs

1//! termdoc's shared vocabulary: the document model, the pipeline traits, and input
2//! sources.
3//!
4//! This crate **depends on no other termdoc crate**. Readers depend only on it; backends
5//! cannot see readers either. That separation is not a convention but Cargo's dependency
6//! graph, verified by `crates/termdoc-cli/tests/layering.rs`.
7//!
8//! The full architecture lives in `docs/DESIGN.md`.
9
10#![forbid(unsafe_op_in_unsafe_fn)]
11#![warn(missing_debug_implementations)]
12
13mod error;
14mod event;
15mod format;
16mod line;
17mod registry;
18mod source;
19mod traits;
20
21pub use error::{Error, Result, exit};
22pub use event::{
23    AdmonitionKind, Align, BreakKind, Diagnostic, Event, Events, ImageSource, Marker, Metadata,
24    Severity, Span, Spanned, Tag, TagKind,
25};
26pub use format::{Confidence, Detection, FormatId, confidence};
27pub use line::{Color, Line, NamedColor, Segment, Style};
28pub use registry::Registry;
29pub use source::{Origin, PROBE_SIZE, Source};
30pub use traits::{
31    Backend, BackendCaps, Detector, DocumentReader, ReadContext, ReaderCaps, Transform,
32};