Expand description
§facet-diff
Provides diffing capabilities for Facet types.
§Sponsors
Thanks to all individual sponsors:
…along with corporate sponsors:
…without whom this work could not exist.
§Special thanks
The facet logo was drawn by Misiasart.
§License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Structs§
- Ansi
Backend - ANSI backend - emits ANSI escape codes for terminal colors.
- Build
Options - Options for building a layout from a diff.
- Diff
Format - Configuration for diff formatting.
- Diff
Options - Configuration options for diff computation
- Diff
Report - A reusable diff plus its original inputs, allowing rendering in different output styles.
- Diff
Symbols - Symbols for diff rendering.
- Diff
Theme - Color theme for diff rendering.
- Interspersed
- An interspersed sequence of A and B values. Pattern: [A?, (B, A)*, B?]
- Json
Flavor - JSON-style output flavor (JSONC with comments for type names).
- Leaf
Change - A single leaf-level change in a diff, with path information.
- Matching
- A bidirectional mapping between nodes in two trees.
- Matching
Config - Configuration for the matching algorithm.
- Node
Label - Label for a node (the actual value for leaves).
- Path
- A path from root to a node.
- Plain
Backend - Plain backend - no styling, just plain text.
- Render
Options - Options for rendering a layout.
- Replace
Group - A group of values being replaced (removals paired with additions).
- Rust
Flavor - Rust-style output flavor.
- Similarity
Result - Result of computing similarity between two Peek values using tree diff.
- Updates
- Sequence updates: update groups interspersed with unchanged items.
- Updates
Group - A group of updates containing replace groups interspersed with nested diffs.
- XmlFlavor
- XML-style output flavor.
Enums§
- Change
Kind - The kind of change for a diff element.
- Diff
- The difference between two values.
- EditOp
- An edit operation in the diff.
- Leaf
Change Kind - The kind of leaf change.
- Node
Kind - The kind of a node in the tree (for type-based matching).
- Path
Segment - A path segment describing how to reach a child.
- Value
- A set of updates, additions, deletions, insertions etc. for a tuple or a struct
Traits§
- Color
Backend - A backend that decides how to render semantic colors.
- Diff
Flavor - A diff output flavor that knows how to format values and present fields.
- Facet
Diff - Extension trait that provides a
diffmethod forFacettypes
Functions§
- build_
layout - Build a Layout from a Diff.
- build_
tree - Build a cinereus tree from a Peek value.
- collect_
leaf_ changes - Collect all leaf-level changes with their paths.
- compute_
element_ similarity - Compute structural similarity between two Peek values using tree diff.
- diff_
new_ peek - Computes the difference between two
Peekvalues (backward compatibility wrapper) - diff_
new_ peek_ with_ options - Computes the difference between two
Peekvalues with options - elements_
are_ similar - Check if two sequence elements should be paired based on structural similarity.
- format_
diff - Format the diff with the given configuration.
- format_
diff_ compact - Format the diff in compact mode (path-based, no tree structure).
- format_
diff_ compact_ plain - Format the diff in compact mode without colors.
- format_
diff_ default - Format the diff with default configuration.
- render_
to_ string - Render a layout to a String.
- tree_
diff - Compute the tree diff between two Facet values.
Type Aliases§
- Facet
Tree - A tree built from a Peek value, ready for diffing.