pub enum CstNodeKind {
Root,
Field,
Section,
Conditional,
Import,
Comment,
BlankLine,
ValueLine,
ElseBlock,
}Expand description
The kind of a CST node.
Variants§
Root
The root container. Its children are top-level fields, sections, comments, and blank lines.
Field
A field: field-name: value (possibly with multi-line continuation).
Section
A section: library, executable foo, common warnings, etc.
Children are the section body (fields, conditionals, imports, comments).
Conditional
A conditional block: if condition + body, with optional else block.
Import
An import: stanza-name directive inside a section.
Comment
A standalone comment line.
BlankLine
A preserved blank line between stanzas or fields.
ValueLine
A value continuation line that is a direct child of its parent field or section. Used to preserve multi-line field values.
ElseBlock
An else block attached to a Conditional node.
Trait Implementations§
Source§impl Clone for CstNodeKind
impl Clone for CstNodeKind
Source§fn clone(&self) -> CstNodeKind
fn clone(&self) -> CstNodeKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CstNodeKind
impl Debug for CstNodeKind
Source§impl PartialEq for CstNodeKind
impl PartialEq for CstNodeKind
Source§fn eq(&self, other: &CstNodeKind) -> bool
fn eq(&self, other: &CstNodeKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CstNodeKind
impl Eq for CstNodeKind
impl StructuralPartialEq for CstNodeKind
Auto Trait Implementations§
impl Freeze for CstNodeKind
impl RefUnwindSafe for CstNodeKind
impl Send for CstNodeKind
impl Sync for CstNodeKind
impl Unpin for CstNodeKind
impl UnsafeUnpin for CstNodeKind
impl UnwindSafe for CstNodeKind
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