#[non_exhaustive]pub struct IfStmt<'arena, 'src> {
pub condition: Expr<'arena, 'src>,
pub then_branch: &'arena Stmt<'arena, 'src>,
pub elseif_branches: ArenaVec<'arena, ElseIfBranch<'arena, 'src>>,
pub else_branch: Option<&'arena Stmt<'arena, 'src>>,
pub uses_alternative: bool,
/* private fields */
}Expand description
An if statement with optional elseif/else branches.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.condition: Expr<'arena, 'src>if condition.
then_branch: &'arena Stmt<'arena, 'src>Statement run when the condition holds.
elseif_branches: ArenaVec<'arena, ElseIfBranch<'arena, 'src>>elseif branches in order.
else_branch: Option<&'arena Stmt<'arena, 'src>>else statement, if any.
uses_alternative: booltrue when written in alternative syntax (: ... endX;).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'arena, 'src> !RefUnwindSafe for IfStmt<'arena, 'src>
impl<'arena, 'src> !Send for IfStmt<'arena, 'src>
impl<'arena, 'src> !Sync for IfStmt<'arena, 'src>
impl<'arena, 'src> !UnwindSafe for IfStmt<'arena, 'src>
impl<'arena, 'src> Freeze for IfStmt<'arena, 'src>
impl<'arena, 'src> Unpin for IfStmt<'arena, 'src>
impl<'arena, 'src> UnsafeUnpin for IfStmt<'arena, 'src>
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