pub struct IfStatement {
pub condition: Expression,
pub then_branch: BlockExpr,
pub else_branch: Option<BlockExpr>,
pub location: Location,
}
Expand description
A conditional statement (if/else)
Fields§
§condition: Expression
Condition to evaluate
then_branch: BlockExpr
Block expression to execute if condition is true
else_branch: Option<BlockExpr>
Optional block expression to execute if condition is false
location: Location
Source code location information
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IfStatement
impl RefUnwindSafe for IfStatement
impl Send for IfStatement
impl Sync for IfStatement
impl Unpin for IfStatement
impl UnwindSafe for IfStatement
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