pub enum Expression {
Show 13 variants
Literal(Literal),
Var(String),
Binary {
op: BinaryOp,
left: Box<Expression>,
right: Box<Expression>,
},
Unary {
op: UnaryOp,
expr: Box<Expression>,
},
Call {
name: String,
args: Vec<Expression>,
},
Index {
array: Box<Expression>,
index: Box<Expression>,
},
Member {
object: Box<Expression>,
field: String,
},
Cast {
ty: Type,
expr: Box<Expression>,
},
ThreadIdx(Dimension),
BlockIdx(Dimension),
BlockDim(Dimension),
GridDim(Dimension),
WarpPrimitive {
op: WarpOp,
args: Vec<Expression>,
},
}
Expand description
Expression types
Variants§
Literal(Literal)
Literal values
Var(String)
Variable reference
Binary
Binary operation
Unary
Unary operation
Call
Function call
Index
Array access
Member
Member access
Cast
Cast expression
ThreadIdx(Dimension)
Thread index access
BlockIdx(Dimension)
Block index access
BlockDim(Dimension)
Block dimension access
GridDim(Dimension)
Grid dimension access
WarpPrimitive
Warp-level primitives
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a duplicate 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 moreSource§impl Debug for Expression
impl Debug for Expression
Source§impl<'de> Deserialize<'de> for Expression
impl<'de> Deserialize<'de> for Expression
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
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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