pub enum Expression {
    IntegerLiteral(IntegerLiteral),
    FloatLiteral(FloatLiteral),
    StringLiteral(StringLiteral),
    BooleanLiteral(BooleanLiteral),
    Parentheses(Parentheses),
    UnaryOperation(UnaryOperation),
    BinaryOperation(BinaryOperation),
    Identifier(IdentifierAccess),
    Null,
}Variants§
IntegerLiteral(IntegerLiteral)
FloatLiteral(FloatLiteral)
StringLiteral(StringLiteral)
BooleanLiteral(BooleanLiteral)
Parentheses(Parentheses)
UnaryOperation(UnaryOperation)
BinaryOperation(BinaryOperation)
Identifier(IdentifierAccess)
Null
Implementations§
Source§impl Expression
 
impl Expression
Sourcepub fn is_integer_literal(&self) -> bool
 
pub fn is_integer_literal(&self) -> bool
Returns true if this is a Expression::IntegerLiteral, otherwise false
Sourcepub fn as_integer_literal_mut(&mut self) -> Option<&mut IntegerLiteral>
 
pub fn as_integer_literal_mut(&mut self) -> Option<&mut IntegerLiteral>
Optionally returns mutable references to the inner fields if this is a Expression::IntegerLiteral, otherwise None
Sourcepub fn as_integer_literal(&self) -> Option<&IntegerLiteral>
 
pub fn as_integer_literal(&self) -> Option<&IntegerLiteral>
Optionally returns references to the inner fields if this is a Expression::IntegerLiteral, otherwise None
Sourcepub fn into_integer_literal(self) -> Result<IntegerLiteral, Self>
 
pub fn into_integer_literal(self) -> Result<IntegerLiteral, Self>
Returns the inner fields if this is a Expression::IntegerLiteral, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_float_literal(&self) -> bool
 
pub fn is_float_literal(&self) -> bool
Returns true if this is a Expression::FloatLiteral, otherwise false
Sourcepub fn as_float_literal_mut(&mut self) -> Option<&mut FloatLiteral>
 
pub fn as_float_literal_mut(&mut self) -> Option<&mut FloatLiteral>
Optionally returns mutable references to the inner fields if this is a Expression::FloatLiteral, otherwise None
Sourcepub fn as_float_literal(&self) -> Option<&FloatLiteral>
 
pub fn as_float_literal(&self) -> Option<&FloatLiteral>
Optionally returns references to the inner fields if this is a Expression::FloatLiteral, otherwise None
Sourcepub fn into_float_literal(self) -> Result<FloatLiteral, Self>
 
pub fn into_float_literal(self) -> Result<FloatLiteral, Self>
Returns the inner fields if this is a Expression::FloatLiteral, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_string_literal(&self) -> bool
 
pub fn is_string_literal(&self) -> bool
Returns true if this is a Expression::StringLiteral, otherwise false
Sourcepub fn as_string_literal_mut(&mut self) -> Option<&mut StringLiteral>
 
pub fn as_string_literal_mut(&mut self) -> Option<&mut StringLiteral>
Optionally returns mutable references to the inner fields if this is a Expression::StringLiteral, otherwise None
Sourcepub fn as_string_literal(&self) -> Option<&StringLiteral>
 
pub fn as_string_literal(&self) -> Option<&StringLiteral>
Optionally returns references to the inner fields if this is a Expression::StringLiteral, otherwise None
Sourcepub fn into_string_literal(self) -> Result<StringLiteral, Self>
 
pub fn into_string_literal(self) -> Result<StringLiteral, Self>
Returns the inner fields if this is a Expression::StringLiteral, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_boolean_literal(&self) -> bool
 
pub fn is_boolean_literal(&self) -> bool
Returns true if this is a Expression::BooleanLiteral, otherwise false
Sourcepub fn as_boolean_literal_mut(&mut self) -> Option<&mut BooleanLiteral>
 
pub fn as_boolean_literal_mut(&mut self) -> Option<&mut BooleanLiteral>
Optionally returns mutable references to the inner fields if this is a Expression::BooleanLiteral, otherwise None
Sourcepub fn as_boolean_literal(&self) -> Option<&BooleanLiteral>
 
pub fn as_boolean_literal(&self) -> Option<&BooleanLiteral>
Optionally returns references to the inner fields if this is a Expression::BooleanLiteral, otherwise None
Sourcepub fn into_boolean_literal(self) -> Result<BooleanLiteral, Self>
 
pub fn into_boolean_literal(self) -> Result<BooleanLiteral, Self>
Returns the inner fields if this is a Expression::BooleanLiteral, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_parentheses(&self) -> bool
 
pub fn is_parentheses(&self) -> bool
Returns true if this is a Expression::Parentheses, otherwise false
Sourcepub fn as_parentheses_mut(&mut self) -> Option<&mut Parentheses>
 
pub fn as_parentheses_mut(&mut self) -> Option<&mut Parentheses>
Optionally returns mutable references to the inner fields if this is a Expression::Parentheses, otherwise None
Sourcepub fn as_parentheses(&self) -> Option<&Parentheses>
 
pub fn as_parentheses(&self) -> Option<&Parentheses>
Optionally returns references to the inner fields if this is a Expression::Parentheses, otherwise None
Sourcepub fn into_parentheses(self) -> Result<Parentheses, Self>
 
pub fn into_parentheses(self) -> Result<Parentheses, Self>
Returns the inner fields if this is a Expression::Parentheses, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_unary_operation(&self) -> bool
 
pub fn is_unary_operation(&self) -> bool
Returns true if this is a Expression::UnaryOperation, otherwise false
Sourcepub fn as_unary_operation_mut(&mut self) -> Option<&mut UnaryOperation>
 
pub fn as_unary_operation_mut(&mut self) -> Option<&mut UnaryOperation>
Optionally returns mutable references to the inner fields if this is a Expression::UnaryOperation, otherwise None
Sourcepub fn as_unary_operation(&self) -> Option<&UnaryOperation>
 
pub fn as_unary_operation(&self) -> Option<&UnaryOperation>
Optionally returns references to the inner fields if this is a Expression::UnaryOperation, otherwise None
Sourcepub fn into_unary_operation(self) -> Result<UnaryOperation, Self>
 
pub fn into_unary_operation(self) -> Result<UnaryOperation, Self>
Returns the inner fields if this is a Expression::UnaryOperation, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_binary_operation(&self) -> bool
 
pub fn is_binary_operation(&self) -> bool
Returns true if this is a Expression::BinaryOperation, otherwise false
Sourcepub fn as_binary_operation_mut(&mut self) -> Option<&mut BinaryOperation>
 
pub fn as_binary_operation_mut(&mut self) -> Option<&mut BinaryOperation>
Optionally returns mutable references to the inner fields if this is a Expression::BinaryOperation, otherwise None
Sourcepub fn as_binary_operation(&self) -> Option<&BinaryOperation>
 
pub fn as_binary_operation(&self) -> Option<&BinaryOperation>
Optionally returns references to the inner fields if this is a Expression::BinaryOperation, otherwise None
Sourcepub fn into_binary_operation(self) -> Result<BinaryOperation, Self>
 
pub fn into_binary_operation(self) -> Result<BinaryOperation, Self>
Returns the inner fields if this is a Expression::BinaryOperation, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_identifier(&self) -> bool
 
pub fn is_identifier(&self) -> bool
Returns true if this is a Expression::Identifier, otherwise false
Sourcepub fn as_identifier_mut(&mut self) -> Option<&mut IdentifierAccess>
 
pub fn as_identifier_mut(&mut self) -> Option<&mut IdentifierAccess>
Optionally returns mutable references to the inner fields if this is a Expression::Identifier, otherwise None
Sourcepub fn as_identifier(&self) -> Option<&IdentifierAccess>
 
pub fn as_identifier(&self) -> Option<&IdentifierAccess>
Optionally returns references to the inner fields if this is a Expression::Identifier, otherwise None
Sourcepub fn into_identifier(self) -> Result<IdentifierAccess, Self>
 
pub fn into_identifier(self) -> Result<IdentifierAccess, Self>
Returns the inner fields if this is a Expression::Identifier, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl Clone for Expression
 
impl Clone for Expression
Source§fn clone(&self) -> Expression
 
fn clone(&self) -> Expression
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more