facet_diff_core/lib.rs
1//! Core types and helpers for diff rendering.
2//!
3//! This crate provides shared infrastructure for rendering diffs across
4//! different serialization formats (XML, JSON, TOML, etc.).
5//!
6//! # Symbols
7//!
8//! ```text
9//! - deleted (red)
10//! + inserted (green)
11//! ← moved from here (blue)
12//! → moved to here (blue)
13//! ```
14//!
15//! # Value-only coloring
16//!
17//! Keys/field names stay neutral, only the changed VALUES are colored:
18//!
19//! ```text
20//! - fill="red" ← "red" is red, "fill=" is white
21//! + fill="blue" ← "blue" is green, "fill=" is white
22//! ```
23
24mod display;
25pub mod layout;
26mod path;
27mod sequences;
28mod symbols;
29mod theme;
30mod types;
31
32pub use layout::{
33 AnsiBackend, Attr, AttrStatus, BuildOptions, ChangedGroup, ColorBackend, DiffFlavor,
34 ElementChange, FieldPresentation, FormatArena, FormattedValue, JsonFlavor, Layout, LayoutNode,
35 PlainBackend, RenderOptions, RustFlavor, SemanticColor, Span, XmlFlavor, build_layout,
36 group_changed_attrs, render, render_to_string,
37};
38pub use path::*;
39pub use sequences::*;
40pub use symbols::*;
41pub use theme::*;
42pub use types::*;