| Crates.io | facet-path |
| lib.rs | facet-path |
| version | 0.43.2 |
| created_at | 2025-12-23 13:47:34.342041+00 |
| updated_at | 2026-01-23 18:01:47.316747+00 |
| description | Path tracking for navigating Facet type structures |
| homepage | https://facet.rs |
| repository | https://github.com/facet-rs/facet |
| max_upload_size | |
| id | 2001552 |
| size | 34,222 |
Path tracking for navigating Facet type structures.
This crate provides lightweight path tracking that records navigation steps through a Facet type hierarchy. When an error occurs during serialization or deserialization, the path can be used to produce helpful error messages showing exactly where in the data structure the problem occurred.
PathStep enum that stores indices, not stringsShapepretty feature for rich error rendering with facet-prettyuse facet_path::{Path, PathStep};
// Build a path during traversal
let mut path = Path::new();
path.push(PathStep::Field(0)); // first field
path.push(PathStep::Index(2)); // third element
path.push(PathStep::Field(1)); // second field of that element
// Format the path using the original Shape
let formatted = path.format_with_shape(my_shape);
// => "outer.items[2].name"
std (default): Enables standard library support
alloc: Enables heap allocation without full std
pretty: Enables rich error rendering with facet-pretty
Thanks to all individual sponsors:
...along with corporate sponsors:
...without whom this work could not exist.
The facet logo was drawn by Misiasart.
Licensed under either of:
at your option.