pub enum ShowExpression {
Show 24 variants
Literal(Box<TypedLiteral>),
Data {
name: String,
},
Rule {
name: String,
},
And {
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>,
},
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,
},
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] (postcard-safe ℚ). [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>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
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.
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
Source§impl<'de> Deserialize<'de> for ShowExpression
impl<'de> Deserialize<'de> for ShowExpression
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>,
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
Source§impl Serialize for ShowExpression
impl Serialize for ShowExpression
impl StructuralPartialEq for ShowExpression
Auto Trait Implementations§
impl Freeze for ShowExpression
impl RefUnwindSafe for ShowExpression
impl Send for ShowExpression
impl Sync for ShowExpression
impl Unpin for ShowExpression
impl UnsafeUnpin for ShowExpression
impl UnwindSafe for ShowExpression
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.