pub enum Node {
Mapping(MappingEntry),
Sequence(SequenceItem),
Control(ControlRegion),
Output(OutputAction),
Comment(CommentLine),
Scalar(ScalarLine),
Opaque(OpaqueNode),
}Expand description
A CST node. Containers own the nodes that structurally nest below them; control regions and action nodes are overlay nodes attached where they appear, without affecting container structure.
Variants§
Mapping(MappingEntry)
A YAML mapping entry.
Sequence(SequenceItem)
A YAML sequence item.
Control(ControlRegion)
A structured Go-template control region.
Output(OutputAction)
A standalone output action.
Comment(CommentLine)
A YAML comment line.
Scalar(ScalarLine)
A scalar content line.
Opaque(OpaqueNode)
Source retained without a more precise structural interpretation.
Implementations§
Source§impl Node
impl Node
Sourcepub fn span_start(&self) -> usize
pub fn span_start(&self) -> usize
The byte where this node’s own content starts.
Sourcepub fn subtree_end(&self) -> usize
pub fn subtree_end(&self) -> usize
The end of the deepest content in this node’s subtree: nested nodes, block-scalar bodies, and inline-value holes that run past the line end for multi-line actions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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