facet_showcase/lib.rs
1//! Unified showcase infrastructure for facet format crates.
2//!
3//! This crate provides consistent rendering for showcases across all facet
4//! format crates (JSON, YAML, KDL, etc.), supporting both terminal output
5//! and HTML generation for the website.
6//!
7//! # Example
8//!
9//! ```ignore
10//! use facet_showcase::{ShowcaseRunner, Language};
11//!
12//! let mut runner = ShowcaseRunner::new("JSON Error Showcase");
13//!
14//! runner.scenario("Unknown Field")
15//! .description("JSON contains a field that doesn't exist in the target struct.")
16//! .input(Language::Json, r#"{"username": "alice", "emial": "test@example.com"}"#)
17//! .target_type::<User>()
18//! .error(&err)
19//! .finish();
20//!
21//! runner.finish();
22//! ```
23
24mod highlighter;
25mod output;
26mod runner;
27
28pub use highlighter::{Highlighter, Language, ansi_to_html, html_escape};
29pub use output::OutputMode;
30pub use runner::{Provenance, Scenario, ShowcaseRunner};