#[non_exhaustive]pub enum RuleExpr {
Bool {
value: bool,
},
Number {
value: f64,
},
String {
value: BoundedText,
},
Null,
Property {
path: PropertyPath,
},
Unary {
op: UnaryOp,
expr: Box<RuleExpr>,
},
Binary {
op: BinaryOp,
left: Box<RuleExpr>,
right: Box<RuleExpr>,
},
Conditional {
condition: Box<RuleExpr>,
when_true: Box<RuleExpr>,
when_false: Box<RuleExpr>,
},
Call {
function: BuiltinFunction,
args: Vec<RuleExpr>,
},
Unsupported {
fragment: BoundedText,
reason: BoundedText,
},
}Expand description
Bounded rule expression.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bool
Boolean literal.
Number
Number literal.
String
String literal.
Fields
§
value: BoundedTextLiteral value.
Null
Null literal.
Property
Property lookup.
Fields
§
path: PropertyPathProperty path.
Unary
Unary operation.
Binary
Binary operation.
Conditional
Ternary conditional expression.
Fields
Call
Built-in function call.
Unsupported
Unsupported source expression retained for report diagnostics.
Fields
§
fragment: BoundedTextOriginal bounded expression fragment.
§
reason: BoundedTextBounded reason.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RuleExpr
impl<'de> Deserialize<'de> for RuleExpr
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for RuleExpr
Auto Trait Implementations§
impl Freeze for RuleExpr
impl RefUnwindSafe for RuleExpr
impl Send for RuleExpr
impl Sync for RuleExpr
impl Unpin for RuleExpr
impl UnsafeUnpin for RuleExpr
impl UnwindSafe for RuleExpr
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