pub enum NodeData {
Scalar {
value: String,
style: ScalarStyle,
},
Sequence {
items: Vec<NodeId>,
style: CollectionStyle,
},
Mapping {
entries: Vec<Entry>,
style: CollectionStyle,
},
Alias(NodeId),
}Expand description
The payload of a node.
Variants§
Scalar
A scalar, kept in its source representation. Type resolution happens on demand rather than at parse time, so that the raw text is never lost.
Fields
§
style: ScalarStyleHow it was written.
Sequence
An ordered list of nodes.
Mapping
An ordered list of key/value pairs.
Fields
§
style: CollectionStyleHow it was written.
Alias(NodeId)
A reference to an anchored node elsewhere in the document.
Kept distinct from its target so that the alias survives a round trip
as *anchor rather than being expanded into a copy.
Trait Implementations§
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnsafeUnpin for NodeData
impl UnwindSafe for NodeData
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