pub enum ShowExpression {
Show 26 variants
Literal(Box<TypedLiteral>),
Data {
name: String,
},
Rule {
name: String,
},
And {
operands: Vec<ShowExpression>,
},
Or {
operands: Vec<ShowExpression>,
},
Not {
operand: Box<ShowExpression>,
},
Arithmetic {
first: Box<ShowExpression>,
steps: Vec<ShowArithmeticStep>,
},
Comparison {
op: ComparisonComputation,
left: Box<ShowExpression>,
right: Box<ShowExpression>,
},
UnitConversion {
operand: Box<ShowExpression>,
targets: Vec<ShowConversionTarget>,
},
Math {
op: MathematicalComputation,
operand: Box<ShowExpression>,
},
StepRounding {
mode: RoundingMode,
operand: Box<ShowExpression>,
step: Option<Box<ShowExpression>>,
},
Veto {
message: Option<String>,
},
Now,
DateRelative {
kind: DateRelativeKind,
operand: Box<ShowExpression>,
},
DateCalendar {
kind: DateCalendarKind,
unit: CalendarPeriodUnit,
operand: Box<ShowExpression>,
},
RangeLiteral {
from: Box<ShowExpression>,
to: Box<ShowExpression>,
},
PastFutureRange {
kind: DateRelativeKind,
operand: Box<ShowExpression>,
},
RangeContainment {
value: Box<ShowExpression>,
range: Box<ShowExpression>,
},
RangeBound {
bound: RangeBound,
operand: Box<ShowExpression>,
},
IsVeto {
operand: Box<ShowExpression>,
},
SpecMember {
base: String,
member: String,
},
Member {
base: Box<ShowExpression>,
member: String,
},
RowField {
field: String,
qualifier: Option<Vec<String>>,
},
RowValue,
RowFieldValue {
field: String,
value: Box<ShowExpression>,
},
ListCommand {
list: Box<ShowExpression>,
command: ShowListCommand,
direction: Option<SortDirection>,
args: Vec<ShowExpression>,
},
}Expand description
Resolved expression tree for Show branches (tag = "type" on the API mirror).
Literals stay TypedLiteral. [RuleResultValue] is built at the
JSON/lemma::api boundary only.
Variants§
Literal(Box<TypedLiteral>)
Data
Rule
And
a and b and c: one left fold, operands in source order.
Fields
operands: Vec<ShowExpression>Or
Fields
operands: Vec<ShowExpression>Not
Fields
operand: Box<ShowExpression>Arithmetic
a + b - c: one left fold on one precedence level, operands in source order.
Comparison
UnitConversion
x as a as b: one node over the innermost operand, targets in application order.
Math
StepRounding
operand -> round or operand -> round step.
Veto
Now
DateRelative
DateCalendar
RangeLiteral
PastFutureRange
RangeContainment
RangeBound
IsVeto
Fields
operand: Box<ShowExpression>SpecMember
rule.field on a spec-valued rule. member is field or alias.field.
Member
(expression).field on a spec value that is not a rule reference.
RowField
Field of the current row inside an instance-list command argument.
Fields
RowValue
The current row’s value: the implicit left operand of a value-list condition.
RowFieldValue
field: value of a row appended by -> with.
ListCommand
direction is set exactly when command is ShowListCommand::Sort.
Fields
list: Box<ShowExpression>command: ShowListCommanddirection: Option<SortDirection>args: Vec<ShowExpression>Trait Implementations§
Source§impl Clone for ShowExpression
impl Clone for ShowExpression
Source§impl Debug for ShowExpression
impl Debug for ShowExpression
impl Eq for ShowExpression
Source§impl From<&ShowExpression> for ShowExpression
impl From<&ShowExpression> for ShowExpression
Source§fn from(expression: &DomainShowExpression) -> Self
fn from(expression: &DomainShowExpression) -> Self
Source§impl PartialEq for ShowExpression
impl PartialEq for ShowExpression
impl StructuralPartialEq for ShowExpression
Auto Trait Implementations§
impl Forget for ShowExpression
impl Freeze for ShowExpressionwhere
*const TypedLiteral is !null: Freeze,
PhantomData<TypedLiteral>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<ShowExpression>: Freeze,
*const ShowExpression is !null: Freeze,
PhantomData<ShowArithmeticStep>: Freeze,
PhantomData<ShowConversionTarget>: Freeze,
PhantomData<String>: Freeze,
impl Move for ShowExpression
impl RefUnwindSafe for ShowExpression
impl Send for ShowExpression
impl Sync for ShowExpression
impl Unpin for ShowExpression
impl UnsafeUnpin for ShowExpressionwhere
*const TypedLiteral is !null: UnsafeUnpin,
PhantomData<TypedLiteral>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ShowExpression>: UnsafeUnpin,
*const ShowExpression is !null: UnsafeUnpin,
PhantomData<ShowArithmeticStep>: UnsafeUnpin,
PhantomData<ShowConversionTarget>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ShowExpressionwhere
BoxRaw<TypedLiteral>: UnwindSafe,
RawVecInner: UnwindSafe,
BoxRaw<ShowExpression>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.