pub struct StmtIf {
pub if_token: If,
pub paren_token: Paren,
pub cond: Expr,
pub then_branch: Box<Stmt>,
pub else_branch: Option<(Else, Box<Stmt>)>,
}
Expand description
An if
statement with an optional else
block: if (expr) { ... } else { ... }
.
Fields§
§if_token: If
§paren_token: Paren
§cond: Expr
§then_branch: Box<Stmt>
§else_branch: Option<(Else, Box<Stmt>)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StmtIf
impl RefUnwindSafe for StmtIf
impl !Send for StmtIf
impl !Sync for StmtIf
impl Unpin for StmtIf
impl UnwindSafe for StmtIf
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)