pub enum ExprKind {
Show 19 variants
Null,
Bool(bool),
Int(i64),
IntOverflow(String),
Float(f64),
String(String),
Bytes(Vec<u8>),
Ident(String),
List(Vec<Expr>),
Map(Vec<(Expr, Expr)>),
Path(Vec<PathPart>),
Member {
object: Box<Expr>,
field: Ident,
},
Index {
object: Box<Expr>,
index: Box<Expr>,
},
Slice {
object: Box<Expr>,
start: Box<Expr>,
end: Box<Expr>,
},
Call {
callee: Callee,
args: Vec<Expr>,
},
Unary {
op: UnaryOp,
operand: Box<Expr>,
},
Binary {
op: BinaryOp,
op_span: Span,
left: Box<Expr>,
right: Box<Expr>,
},
Is {
value: Box<Expr>,
keyword: Span,
type_name: Ident,
},
Ternary {
condition: Box<Expr>,
question: Span,
then: Box<Expr>,
otherwise: Box<Expr>,
},
}Variants§
Null
Bool(bool)
Int(i64)
IntOverflow(String)
An integer literal beyond i64: it compiles, and fails when evaluated.
Float(f64)
String(String)
Bytes(Vec<u8>)
Ident(String)
A variable: request, a wildcard, a parameter or a let.
List(Vec<Expr>)
Map(Vec<(Expr, Expr)>)
{k: v, …}, in source order.
Path(Vec<PathPart>)
A path literal: /databases/$(database)/documents.
Member
object.field.
Index
object[index].
Slice
object[start:end].
Call
f(args), math.abs(args) or receiver.f(args).
Unary
Binary
Is
value is type.
Ternary
condition ? then : otherwise.
Trait Implementations§
impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnsafeUnpin for ExprKind
impl UnwindSafe for ExprKind
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