pub struct ElseBlock {
pub condition: Box<Expr>,
pub block: Block,
pub else_if: bool,
}Expand description
Represents an else or else if block in the AST.
An ElseBlock can optionally include a condition (for else if) and contains a block of statements.
Fields§
§condition: Box<Expr>The condition expression for an else if block. None for a plain else block.
block: BlockThe block of code to execute for this else if or else block.
else_if: boolIndicates whether this block is an else if (true) or a plain else (false).
Trait Implementations§
impl StructuralPartialEq for ElseBlock
Auto Trait Implementations§
impl Freeze for ElseBlock
impl RefUnwindSafe for ElseBlock
impl Send for ElseBlock
impl Sync for ElseBlock
impl Unpin for ElseBlock
impl UnwindSafe for ElseBlock
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