pub enum HirExprKind {
Access {
base: Handle<HirExpr>,
index: Handle<HirExpr>,
},
Select {
base: Handle<HirExpr>,
field: String,
},
Literal(Literal),
Binary {
left: Handle<HirExpr>,
op: BinaryOperator,
right: Handle<HirExpr>,
},
Unary {
op: UnaryOperator,
expr: Handle<HirExpr>,
},
Variable(VariableReference),
Call(FunctionCall),
Conditional {
condition: Handle<HirExpr>,
accept: Handle<HirExpr>,
reject: Handle<HirExpr>,
},
Assign {
tgt: Handle<HirExpr>,
value: Handle<HirExpr>,
},
PrePostfix {
op: BinaryOperator,
postfix: bool,
expr: Handle<HirExpr>,
},
Method {
expr: Handle<HirExpr>,
name: String,
args: Vec<Handle<HirExpr>>,
},
}
Variants§
Access
Select
Literal(Literal)
Binary
Unary
Variable(VariableReference)
Call(FunctionCall)
Conditional
Represents the ternary operator in glsl (:?
)
Fields
Assign
PrePostfix
A prefix/postfix operator like ++
Fields
§
op: BinaryOperator
The operation to be performed
Method
A method call like what.something(a, b, c)
Trait Implementations§
source§impl Clone for HirExprKind
impl Clone for HirExprKind
source§fn clone(&self) -> HirExprKind
fn clone(&self) -> HirExprKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HirExprKind
impl RefUnwindSafe for HirExprKind
impl Send for HirExprKind
impl Sync for HirExprKind
impl Unpin for HirExprKind
impl UnwindSafe for HirExprKind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)