Skip to main content

mandible_core/
lib.rs

1//! `mandible-core`: the shared intermediate representation (IR) every mandible
2//! extraction tier normalizes into, and the merge logic that combines
3//! several tiers' output for the same node into one.
4//!
5//! See spec §4. This crate has no knowledge of any specific tool, tier, or
6//! terminal library — it is pure data model plus the sanitization and merge
7//! rules that keep that data model trustworthy.
8
9#![forbid(unsafe_code)]
10#![warn(missing_docs)]
11
12pub mod audit;
13mod merge;
14mod node;
15mod noderef;
16mod provenance;
17mod snapshot;
18mod text;
19
20pub use merge::{
21    merge_flag_lists, merge_nodes, merge_positional_lists, merge_subcommand_lists, pair_aliases,
22    MergeError,
23};
24pub use node::{
25    is_command_name_shaped, CommandNode, Confession, Example, Flag, Positional, ValueKind,
26};
27pub use noderef::{resolve, resolve_flag, resolve_mut, FlagKey, NodeRef};
28pub use provenance::{Authority, Axis, ManFormat, Provenance, Source};
29pub use snapshot::{
30    to_snapshot, ConfessionSnapshot, ExampleSnapshot, FlagSnapshot, NodeSnapshot,
31    PositionalSnapshot, ProvenanceSnapshot,
32};
33pub use text::{Text, MAX_TEXT_CHARS};