pub enum AnnotatedNode {
Leaf {
value: Value,
source: usize,
},
Map {
entries: Vec<(Value, AnnotatedNode)>,
},
}Expand description
A merged value plus the layer that produced each leaf.
Layer indices are 0-based and refer to the slice passed to
merge_layers_annotated: 0 is the base, 1 is the first overlay,
and so on. Callers map indices to display labels (filenames, usually)
at render time.
Variants§
Leaf
Terminal value: scalar, null, or sequence. source is the layer
that last wrote this value.
Map
Mapping node. entries preserves insertion order matching
deep_merge’s re-key-to-end behaviour (overridden keys move to
the tail of the map, matching the final serde_yaml serialisation).
Fields
§
entries: Vec<(Value, AnnotatedNode)>Implementations§
Source§impl AnnotatedNode
impl AnnotatedNode
Sourcepub fn to_value(&self) -> Value
pub fn to_value(&self) -> Value
Materialise the merged Value — useful for equality tests
against deep_merge output.
Trait Implementations§
Source§impl Clone for AnnotatedNode
impl Clone for AnnotatedNode
Source§fn clone(&self) -> AnnotatedNode
fn clone(&self) -> AnnotatedNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AnnotatedNode
impl RefUnwindSafe for AnnotatedNode
impl Send for AnnotatedNode
impl Sync for AnnotatedNode
impl Unpin for AnnotatedNode
impl UnsafeUnpin for AnnotatedNode
impl UnwindSafe for AnnotatedNode
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