pub enum CmdElementType {
Token(CmdTokenType),
Root,
CommandStatement,
IfStatement,
ForStatement,
SetStatement,
LabelDefinition,
Error,
}Expand description
Represents all possible element kinds in the Windows Command (CMD) scripting language.
Variants§
Token(CmdTokenType)
A wrapper for tokens
Root
Root node representing the entire source file
CommandStatement
A single command or a pipeline
IfStatement
An if statement
ForStatement
A for loop
SetStatement
A set statement
LabelDefinition
A label definition
Error
Error node for syntax errors
Trait Implementations§
Source§impl Clone for CmdElementType
impl Clone for CmdElementType
Source§fn clone(&self) -> CmdElementType
fn clone(&self) -> CmdElementType
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 CmdElementType
impl Debug for CmdElementType
Source§impl<'de> Deserialize<'de> for CmdElementType
impl<'de> Deserialize<'de> for CmdElementType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl ElementType for CmdElementType
impl ElementType for CmdElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_root(&self) -> bool
fn is_root(&self) -> bool
Returns true if this element represents the root of the parsed tree.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this element matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
Source§impl From<CmdTokenType> for CmdElementType
impl From<CmdTokenType> for CmdElementType
Source§fn from(token: CmdTokenType) -> Self
fn from(token: CmdTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for CmdElementType
impl Hash for CmdElementType
Source§impl Ord for CmdElementType
impl Ord for CmdElementType
Source§fn cmp(&self, other: &CmdElementType) -> Ordering
fn cmp(&self, other: &CmdElementType) -> 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 CmdElementType
impl PartialEq for CmdElementType
Source§impl PartialOrd for CmdElementType
impl PartialOrd for CmdElementType
Source§impl Serialize for CmdElementType
impl Serialize for CmdElementType
impl Copy for CmdElementType
impl Eq for CmdElementType
impl StructuralPartialEq for CmdElementType
Auto Trait Implementations§
impl Freeze for CmdElementType
impl RefUnwindSafe for CmdElementType
impl Send for CmdElementType
impl Sync for CmdElementType
impl Unpin for CmdElementType
impl UnsafeUnpin for CmdElementType
impl UnwindSafe for CmdElementType
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