#[repr(u16)]pub enum SyntaxKind {
Show 16 variants
LEFT_BRACKET = 0,
RIGHT_BRACKET = 1,
EQUALS = 2,
KEY = 3,
SECTION_NAME = 4,
VALUE = 5,
COMMENT = 6,
NEWLINE = 7,
WHITESPACE = 8,
LINE_CONTINUATION = 9,
ERROR = 10,
ROOT = 11,
SECTION = 12,
SECTION_HEADER = 13,
ENTRY = 14,
BLANK_LINE = 15,
}Expand description
Token types for systemd unit files
Variants§
LEFT_BRACKET = 0
Left bracket: [
RIGHT_BRACKET = 1
Right bracket: ]
EQUALS = 2
Equals sign: =
KEY = 3
Key name (e.g., “Type”, “ExecStart”)
SECTION_NAME = 4
Section name (e.g., “Unit”, “Service”)
VALUE = 5
Value part of key=value
COMMENT = 6
Comment starting with # or ;
NEWLINE = 7
Newline: \n or \r\n
WHITESPACE = 8
Whitespace: spaces and tabs
LINE_CONTINUATION = 9
Line continuation: backslash at end of line
ERROR = 10
Error token
ROOT = 11
Root node: the entire file
SECTION = 12
Section node: a section with its entries
SECTION_HEADER = 13
Section header node: [Section Name]
ENTRY = 14
Entry node: Key=Value
BLANK_LINE = 15
Blank line node
Trait Implementations§
Source§impl Clone for SyntaxKind
impl Clone for SyntaxKind
Source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
Returns a duplicate of the value. Read more
1.0.0 · 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 SyntaxKind
impl Debug for SyntaxKind
Source§impl From<SyntaxKind> for SyntaxKind
Convert our SyntaxKind into the rowan SyntaxKind.
impl From<SyntaxKind> for SyntaxKind
Convert our SyntaxKind into the rowan SyntaxKind.
Source§fn from(kind: SyntaxKind) -> Self
fn from(kind: SyntaxKind) -> Self
Converts to this type from the input type.
Source§impl Hash for SyntaxKind
impl Hash for SyntaxKind
Source§impl Ord for SyntaxKind
impl Ord for SyntaxKind
Source§fn cmp(&self, other: &SyntaxKind) -> Ordering
fn cmp(&self, other: &SyntaxKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SyntaxKind
impl PartialEq for SyntaxKind
Source§impl PartialOrd for SyntaxKind
impl PartialOrd for SyntaxKind
impl Copy for SyntaxKind
impl Eq for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Auto Trait Implementations§
impl Freeze for SyntaxKind
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin for SyntaxKind
impl UnwindSafe for SyntaxKind
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