pub enum DatexExpression {
Show 21 variants
Invalid,
Null,
Boolean(bool),
Text(String),
Decimal(Decimal),
Integer(Integer),
Endpoint(Endpoint),
Array(Vec<DatexExpression>),
Object(Vec<(DatexExpression, DatexExpression)>),
Tuple(Vec<TupleEntry>),
Statements(Vec<Statement>),
Variable(Option<VariableId>, String),
VariableDeclaration(Option<VariableId>, VariableType, VariableMutType, String, Box<DatexExpression>),
VariableAssignment(Option<VariableId>, String, Box<DatexExpression>),
Slot(Slot),
SlotAssignment(Slot, Box<DatexExpression>),
BinaryOperation(BinaryOperator, Box<DatexExpression>, Box<DatexExpression>),
UnaryOperation(UnaryOperator, Box<DatexExpression>),
ApplyChain(Box<DatexExpression>, Vec<Apply>),
Placeholder,
RemoteExecution(Box<DatexExpression>, Box<DatexExpression>),
}Variants§
Invalid
Invalid expression, e.g. syntax error
Null
null
Boolean(bool)
Boolean (true or false)
Text(String)
Text, e.g “Hello, world!”
Decimal(Decimal)
Decimal, e.g 123.456789123456
Integer(Integer)
Integer, e.g 123456789123456789
Endpoint(Endpoint)
Endpoint, e.g. @test_a or @test_b
Array(Vec<DatexExpression>)
Array, e.g [1, 2, 3, "text"]
Object(Vec<(DatexExpression, DatexExpression)>)
Object, e.g {“key”: “value”, key2: 2}
Tuple(Vec<TupleEntry>)
Tuple, e.g (1: 2, 3: 4, “xy”) or without brackets: 1,2,a:3
Statements(Vec<Statement>)
One or more statements, e.g (1; 2; 3)
Variable(Option<VariableId>, String)
Identifier, e.g. a variable name. VariableId is always set to 0 by the ast parser.
VariableDeclaration(Option<VariableId>, VariableType, VariableMutType, String, Box<DatexExpression>)
Variable declaration, e.g. const x = 1, const mut x = 1, or var y = 2. VariableId is always set to 0 by the ast parser.
VariableAssignment(Option<VariableId>, String, Box<DatexExpression>)
Variable assignment, e.g. x = 1. VariableId is always set to 0 by the ast parser.
Slot(Slot)
Slot, e.g. #1, #endpoint
SlotAssignment(Slot, Box<DatexExpression>)
Slot assignment
BinaryOperation(BinaryOperator, Box<DatexExpression>, Box<DatexExpression>)
UnaryOperation(UnaryOperator, Box<DatexExpression>)
ApplyChain(Box<DatexExpression>, Vec<Apply>)
Placeholder
RemoteExecution(Box<DatexExpression>, Box<DatexExpression>)
Trait Implementations§
Source§impl Clone for DatexExpression
impl Clone for DatexExpression
Source§fn clone(&self) -> DatexExpression
fn clone(&self) -> DatexExpression
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 DatexExpression
impl Debug for DatexExpression
Source§impl PartialEq for DatexExpression
impl PartialEq for DatexExpression
Source§impl TryFrom<DatexExpression> for ValueContainer
impl TryFrom<DatexExpression> for ValueContainer
impl StructuralPartialEq for DatexExpression
Auto Trait Implementations§
impl Freeze for DatexExpression
impl RefUnwindSafe for DatexExpression
impl Send for DatexExpression
impl Sync for DatexExpression
impl Unpin for DatexExpression
impl UnwindSafe for DatexExpression
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more