pub enum ExprKind {
Show 24 variants
Literal(Literal),
Ident(String),
QueryVar(String),
Iri(String),
Prefixed(String, String),
Blank(String),
Binary {
op: BinOp,
left: Box<Expr>,
right: Box<Expr>,
},
Unary {
op: UnOp,
expr: Box<Expr>,
},
Await(Box<Expr>),
Member {
recv: Box<Expr>,
name: String,
},
Call {
callee: Box<Expr>,
args: Vec<Arg>,
},
Index {
recv: Box<Expr>,
index: Box<Expr>,
},
Try(Box<Expr>),
List(Vec<Expr>),
Record(Vec<NamedArg>),
Triple {
subject: Box<Expr>,
predicate: Box<Expr>,
object: Box<Expr>,
},
Reified {
subject: Box<Expr>,
predicate: Box<Expr>,
object: Box<Expr>,
reifier: Box<Expr>,
},
Pipe {
left: Box<Expr>,
right: Box<Expr>,
},
GraphQuery {
is_ask: bool,
pattern: String,
variables: Vec<String>,
},
ModalLogic {
modality: ModalKind,
args: Vec<Expr>,
body: Option<Box<Expr>>,
},
Interpolate(Vec<Expr>),
Lambda {
params: Vec<String>,
body: Box<Expr>,
},
Tween {
from: Box<Expr>,
to: Box<Expr>,
over: Box<Expr>,
ease: Option<String>,
spring: Option<Vec<NamedArg>>,
},
IfElse {
cond: Box<Expr>,
then_value: Box<Expr>,
else_value: Box<Expr>,
},
}Variants§
Literal(Literal)
Ident(String)
QueryVar(String)
Iri(String)
Prefixed(String, String)
Blank(String)
Binary
Unary
Await(Box<Expr>)
Member
Call
Index
Try(Box<Expr>)
List(Vec<Expr>)
Record(Vec<NamedArg>)
Triple
Reified
Pipe
GraphQuery
ModalLogic
Interpolate(Vec<Expr>)
Lambda
Non-capturing lambda |x, y| expr.
Tween
from ~ to over duration ease name (Proposal D).
Fields
IfElse
Value-producing conditional if cond { a } else { b }.
Each branch holds exactly one result expression. The final else is
mandatory; an else if chain is represented as a nested IfElse in
else_value. Only the selected branch is evaluated at runtime, while
static checks (effects, capabilities) inspect both branches.
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