pub struct ConditionalExpr {
pub condition: Box<Expression>,
pub then_branch: Box<Expression>,
pub else_branch: Box<Expression>,
pub expr_type: TypeId,
pub location: Location,
}
Expand description
A conditional expression (if/else)
Fields§
§condition: Box<Expression>
Condition to evaluate
then_branch: Box<Expression>
Expression to evaluate if condition is true
else_branch: Box<Expression>
Expression to evaluate if condition is false (always present for expressions)
expr_type: TypeId
Type of the conditional expression
location: Location
Source code location information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConditionalExpr
impl RefUnwindSafe for ConditionalExpr
impl Send for ConditionalExpr
impl Sync for ConditionalExpr
impl Unpin for ConditionalExpr
impl UnwindSafe for ConditionalExpr
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