pub struct ConstantExpression<'a> {
pub value: ConstantValue<'a>,
pub operation: Option<(ExpressionOperations, Box<ConstantExpression<'a>>)>,
}
Expand description
ConstantExpression
constant expression element of AST.
Used to declare constants.
The constant expression value based on other constant or primitive values.
Constant Expression can contain optional expression operation with other
constant expression. So it can be represented as Constant expression
tree as operations with other constant expressions.
Fields§
§value: ConstantValue<'a>
Constant value - can be other constant 0r primitive value
operation: Option<(ExpressionOperations, Box<ConstantExpression<'a>>)>
Constant expression optional expression operation with other constant expression declarations.
Trait Implementations§
Source§impl<'a> Clone for ConstantExpression<'a>
impl<'a> Clone for ConstantExpression<'a>
Source§fn clone(&self) -> ConstantExpression<'a>
fn clone(&self) -> ConstantExpression<'a>
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<'a> Debug for ConstantExpression<'a>
impl<'a> Debug for ConstantExpression<'a>
Source§impl From<ConstantExpression<'_>> for ConstantExpression
impl From<ConstantExpression<'_>> for ConstantExpression
Source§fn from(value: ConstantExpression<'_>) -> Self
fn from(value: ConstantExpression<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> PartialEq for ConstantExpression<'a>
impl<'a> PartialEq for ConstantExpression<'a>
impl<'a> StructuralPartialEq for ConstantExpression<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConstantExpression<'a>
impl<'a> RefUnwindSafe for ConstantExpression<'a>
impl<'a> Send for ConstantExpression<'a>
impl<'a> Sync for ConstantExpression<'a>
impl<'a> Unpin for ConstantExpression<'a>
impl<'a> UnwindSafe for ConstantExpression<'a>
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