pub struct IfStmt {
pub span: Span,
pub condition: Expr,
pub then_branch: Box<Stmt>,
pub else_branch: Option<Box<Stmt>>,
}Expand description
One if statement.
Fields§
§span: SpanSource span covering the whole statement.
condition: ExprCondition expression.
then_branch: Box<Stmt>Statement executed when the condition is true.
else_branch: Option<Box<Stmt>>Optional else branch.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IfStmt
impl<'de> Deserialize<'de> for IfStmt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for IfStmt
Auto Trait Implementations§
impl Freeze for IfStmt
impl RefUnwindSafe for IfStmt
impl Send for IfStmt
impl Sync for IfStmt
impl Unpin for IfStmt
impl UnsafeUnpin for IfStmt
impl UnwindSafe for IfStmt
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