Enum cedar_policy_core::est::ExprNoExt
source · pub enum ExprNoExt {
Show 27 variants
Value(JSONValue),
Var(Var),
Slot(SlotId),
Unknown {
name: SmolStr,
},
Not {
arg: Arc<Expr>,
},
Neg {
arg: Arc<Expr>,
},
Eq {
left: Arc<Expr>,
right: Arc<Expr>,
},
NotEq {
left: Arc<Expr>,
right: Arc<Expr>,
},
In {
left: Arc<Expr>,
right: Arc<Expr>,
},
Less {
left: Arc<Expr>,
right: Arc<Expr>,
},
LessEq {
left: Arc<Expr>,
right: Arc<Expr>,
},
Greater {
left: Arc<Expr>,
right: Arc<Expr>,
},
GreaterEq {
left: Arc<Expr>,
right: Arc<Expr>,
},
And {
left: Arc<Expr>,
right: Arc<Expr>,
},
Or {
left: Arc<Expr>,
right: Arc<Expr>,
},
Add {
left: Arc<Expr>,
right: Arc<Expr>,
},
Sub {
left: Arc<Expr>,
right: Arc<Expr>,
},
Mul {
left: Arc<Expr>,
right: Arc<Expr>,
},
Contains {
left: Arc<Expr>,
right: Arc<Expr>,
},
ContainsAll {
left: Arc<Expr>,
right: Arc<Expr>,
},
ContainsAny {
left: Arc<Expr>,
right: Arc<Expr>,
},
GetAttr {
left: Arc<Expr>,
attr: SmolStr,
},
HasAttr {
left: Arc<Expr>,
attr: SmolStr,
},
Like {
left: Arc<Expr>,
pattern: SmolStr,
},
If {
cond_expr: Arc<Expr>,
then_expr: Arc<Expr>,
else_expr: Arc<Expr>,
},
Set(Vec<Expr>),
Record(HashMap<SmolStr, Expr>),
}
Expand description
Serde JSON structure for [any Cedar expression other than an extension function call] in the EST format
Variants§
Value(JSONValue)
Literal value (including anything that’s legal to express in the attribute-value JSON format)
Var(Var)
Var
Slot(SlotId)
Template slot
Unknown
Unknown (for partial evaluation)
Not
!
Neg
-
Eq
==
NotEq
!=
In
in
Less
<
LessEq
<=
Greater
>
GreaterEq
>=
And
&&
Or
||
Add
+
Sub
-
Mul
*
Contains
Fields
contains()
ContainsAll
Fields
containsAll()
ContainsAny
Fields
containsAny()
GetAttr
Get-attribute
HasAttr
has
Like
like
If
Fields
Ternary
Set(Vec<Expr>)
Set literal, whose elements may be arbitrary expressions (which is why we need this case specifically and can’t just use Expr::Value)
Record(HashMap<SmolStr, Expr>)
Record literal, whose elements may be arbitrary expressions (which is why we need this case specifically and can’t just use Expr::Value)
Trait Implementations§
source§impl<'de> Deserialize<'de> for ExprNoExt
impl<'de> Deserialize<'de> for ExprNoExt
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
source§impl PartialEq<ExprNoExt> for ExprNoExt
impl PartialEq<ExprNoExt> for ExprNoExt
impl StructuralPartialEq for ExprNoExt
Auto Trait Implementations§
impl RefUnwindSafe for ExprNoExt
impl Send for ExprNoExt
impl Sync for ExprNoExt
impl Unpin for ExprNoExt
impl UnwindSafe for ExprNoExt
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