pub enum TracedValue {
Leaf {
value: Value,
source: SourceRef,
},
Object(BTreeMap<String, TracedValue>),
}Expand description
The result of [Loader::trace]: the merged tree with per-leaf
provenance. Objects recurse; every non-object value (including whole
arrays) is a TracedValue::Leaf.
Serializes to JSON as
{ "$id": "Leaf", "value": …, "source": …, "format": … } leaves —
the shape used by the CLI --trace output and the test fixtures’
expect.json. $id tags the node kind (an object node is a plain
map), source is the file path (SourceRef::String(i) prints as
"string:<i>"), format is the value’s Value::format_id.
Variants§
Trait Implementations§
Source§impl Clone for TracedValue
impl Clone for TracedValue
Source§fn clone(&self) -> TracedValue
fn clone(&self) -> TracedValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TracedValue
impl Debug for TracedValue
Source§impl PartialEq for TracedValue
impl PartialEq for TracedValue
Source§fn eq(&self, other: &TracedValue) -> bool
fn eq(&self, other: &TracedValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TracedValue
impl Serialize for TracedValue
impl StructuralPartialEq for TracedValue
Auto Trait Implementations§
impl Freeze for TracedValue
impl RefUnwindSafe for TracedValue
impl Send for TracedValue
impl Sync for TracedValue
impl Unpin for TracedValue
impl UnsafeUnpin for TracedValue
impl UnwindSafe for TracedValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more