pub enum ConstExpr {
Literal(Literal),
NameRef(Ref<ConstNode>),
Unary {
op: UnaryOp,
operand: Id<ConstExprNode>,
},
Binary {
op: BinaryOp,
lhs: Id<ConstExprNode>,
rhs: Id<ConstExprNode>,
},
}Expand description
One node of a constant expression tree.
Variants§
Literal(Literal)
A literal value.
NameRef(Ref<ConstNode>)
A reference to another constant by name.
Unary
Unary application.
Binary
Binary application.
Trait Implementations§
impl Eq for ConstExpr
impl StructuralPartialEq for ConstExpr
Auto Trait Implementations§
impl Freeze for ConstExpr
impl RefUnwindSafe for ConstExpr
impl Send for ConstExpr
impl Sync for ConstExpr
impl Unpin for ConstExpr
impl UnsafeUnpin for ConstExpr
impl UnwindSafe for ConstExpr
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