pub enum Node<Loc = Span> {
Scalar {
value: String,
style: ScalarStyle,
anchor: Option<String>,
tag: Option<String>,
loc: Loc,
},
Mapping {
entries: Vec<(Self, Self)>,
anchor: Option<String>,
tag: Option<String>,
loc: Loc,
},
Sequence {
items: Vec<Self>,
anchor: Option<String>,
tag: Option<String>,
loc: Loc,
},
Alias {
name: String,
loc: Loc,
},
}Expand description
A YAML node parameterized by its location type.
Variants§
Scalar
A scalar value.
Mapping
A mapping (sequence of key–value pairs preserving declaration order).
Sequence
A sequence (ordered list of nodes).
Alias
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