vole_document/adapter/mod.rs
1//! Format adapters.
2//!
3//! An adapter proposes a reconstruction hypothesis. It never overrides the
4//! byte authority: a hypothesis is only admitted after it reproduces the exact
5//! source bytes and wins the complete-cost court.
6
7#[cfg(feature = "docx")]
8pub mod docx;
9#[cfg(feature = "epub")]
10pub mod epub;
11pub mod opaque;
12#[cfg(feature = "package")]
13pub mod package;
14pub mod pdf;
15
16/// The source-format class decision for an input.
17///
18/// File extensions are hints, never authority. In Phase 1 every input is
19/// preserved by the opaque adapter, which is the unconditional exact floor.
20#[derive(Debug, Clone, Copy, PartialEq, Eq)]
21pub enum FormatDecision {
22 /// Unstructured bytes; preserved exactly by the opaque adapter.
23 Opaque,
24}