pub enum Expr {
Show 17 variants
Identifier(String),
String(String),
Number(f64),
Boolean(bool),
Null,
Object(Vec<(String, Expr)>),
Array(Vec<Expr>),
Call(Box<Expr>, Vec<Expr>),
ArrayAccess(Box<Expr>, Box<Expr>),
FieldAccess(Box<Expr>, String),
Local(Vec<(String, Expr)>, Box<Expr>),
Function(Vec<String>, Box<Expr>),
StringInterpolation(Vec<StringPart>),
ArrayComprehension {
expr: Box<Expr>,
var_name: String,
array_expr: Box<Expr>,
condition: Option<Box<Expr>>,
},
Conditional(Box<Expr>, Box<Expr>, Box<Expr>),
BinaryOp(BinaryOp, Box<Expr>, Box<Expr>),
UnaryOp(UnaryOp, Box<Expr>),
}
Expand description
Expression in Jsonnet
Variants§
Identifier(String)
Identifier
String(String)
String literal
Number(f64)
Number literal
Boolean(bool)
Boolean literal
Null
Null literal
Object(Vec<(String, Expr)>)
Object literal
Array(Vec<Expr>)
Array literal
Call(Box<Expr>, Vec<Expr>)
Function call
ArrayAccess(Box<Expr>, Box<Expr>)
Array indexing
FieldAccess(Box<Expr>, String)
Object field access
Local(Vec<(String, Expr)>, Box<Expr>)
Local variable bindings
Function(Vec<String>, Box<Expr>)
Function definition
StringInterpolation(Vec<StringPart>)
String interpolation
ArrayComprehension
Array comprehension
Conditional(Box<Expr>, Box<Expr>, Box<Expr>)
Conditional expression
BinaryOp(BinaryOp, Box<Expr>, Box<Expr>)
Binary operation
UnaryOp(UnaryOp, Box<Expr>)
Unary operation
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Expr
impl<'de> Deserialize<'de> for Expr
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 Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnwindSafe for Expr
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