pub enum ElmElementType {
Show 23 variants
Root,
Module,
Import,
TypeDeclaration,
TypeAlias,
FunctionDeclaration,
Expression,
Literal,
Identifier,
BinaryExpression,
UnaryExpression,
IfExpression,
CaseExpression,
LetExpression,
TupleExpression,
ListExpression,
RecordExpression,
FieldExpression,
LambdaExpression,
TypeSignature,
ValueDeclaration,
Pattern,
Error,
}Expand description
Element types for Elm.
Variants§
Root
The root node of the AST.
Module
A module declaration.
Import
An import statement.
TypeDeclaration
A custom type declaration.
TypeAlias
A type alias declaration.
FunctionDeclaration
A function declaration.
Expression
A generic expression.
Literal
A literal value.
Identifier
An identifier.
BinaryExpression
A binary expression.
UnaryExpression
A unary expression.
IfExpression
An if expression.
CaseExpression
A case expression.
LetExpression
A let expression.
TupleExpression
A tuple expression.
ListExpression
A list expression.
RecordExpression
A record expression.
FieldExpression
A field access expression.
LambdaExpression
A lambda expression.
TypeSignature
A type signature.
ValueDeclaration
A value declaration.
Pattern
A pattern.
Error
An error element.
Trait Implementations§
Source§impl Clone for ElmElementType
impl Clone for ElmElementType
Source§fn clone(&self) -> ElmElementType
fn clone(&self) -> ElmElementType
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 ElmElementType
impl Debug for ElmElementType
Source§impl<'de> Deserialize<'de> for ElmElementType
impl<'de> Deserialize<'de> for ElmElementType
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 ElmElementType
impl ElementType for ElmElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
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<ElmTokenType> for ElmElementType
impl From<ElmTokenType> for ElmElementType
Source§fn from(token: ElmTokenType) -> Self
fn from(token: ElmTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for ElmElementType
impl Hash for ElmElementType
Source§impl PartialEq for ElmElementType
impl PartialEq for ElmElementType
Source§impl Serialize for ElmElementType
impl Serialize for ElmElementType
impl Copy for ElmElementType
impl Eq for ElmElementType
impl StructuralPartialEq for ElmElementType
Auto Trait Implementations§
impl Freeze for ElmElementType
impl RefUnwindSafe for ElmElementType
impl Send for ElmElementType
impl Sync for ElmElementType
impl Unpin for ElmElementType
impl UnsafeUnpin for ElmElementType
impl UnwindSafe for ElmElementType
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