pub enum Node<Loc = Span> {
Scalar {
value: String,
style: ScalarStyle,
anchor: Option<String>,
tag: Option<String>,
loc: Loc,
leading_comments: Vec<String>,
trailing_comment: Option<String>,
},
Mapping {
entries: Vec<(Self, Self)>,
anchor: Option<String>,
tag: Option<String>,
loc: Loc,
leading_comments: Vec<String>,
trailing_comment: Option<String>,
},
Sequence {
items: Vec<Self>,
anchor: Option<String>,
tag: Option<String>,
loc: Loc,
leading_comments: Vec<String>,
trailing_comment: Option<String>,
},
Alias {
name: String,
loc: Loc,
leading_comments: Vec<String>,
trailing_comment: Option<String>,
},
}Expand description
A YAML node parameterized by its location type.
Variants§
Scalar
A scalar value.
Fields
§
style: ScalarStyle§
loc: LocMapping
A mapping (sequence of key–value pairs preserving declaration order).
Fields
§
loc: LocSequence
A sequence (ordered list of nodes).
Fields
§
loc: LocAlias
An alias reference (lossless mode only — resolved mode expands these).
Implementations§
Trait Implementations§
impl<Loc> StructuralPartialEq for Node<Loc>
Auto Trait Implementations§
impl<Loc> Freeze for Node<Loc>where
Loc: Freeze,
impl<Loc> RefUnwindSafe for Node<Loc>where
Loc: RefUnwindSafe,
impl<Loc> Send for Node<Loc>where
Loc: Send,
impl<Loc> Sync for Node<Loc>where
Loc: Sync,
impl<Loc> Unpin for Node<Loc>where
Loc: Unpin,
impl<Loc> UnsafeUnpin for Node<Loc>where
Loc: UnsafeUnpin,
impl<Loc> UnwindSafe for Node<Loc>where
Loc: UnwindSafe,
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