#[repr(C)]pub struct StatementIf<'ast> {
pub base: StatementHeader<'ast>,
pub condition: Expression<'ast>,
pub then_body: Block<'ast>,
pub else_body: Option<Statement<'ast>>,
pub then_location: Option<Location>,
pub else_location: Option<Location>,
}Fields§
§base: StatementHeader<'ast>§condition: Expression<'ast>§then_body: Block<'ast>§else_body: Option<Statement<'ast>>§then_location: Option<Location>§else_location: Option<Location>Implementations§
Source§impl<'ast> StatementIf<'ast>
impl<'ast> StatementIf<'ast>
pub fn new( location: Location, has_semicolon: bool, condition: Expression<'ast>, then_body: Block<'ast>, else_body: Option<Statement<'ast>>, then_location: Option<Location>, else_location: Option<Location>, ) -> Self
pub fn location(&self) -> Location
pub fn has_semicolon(&self) -> bool
Trait Implementations§
Source§impl Debug for StatementIf<'_>
impl Debug for StatementIf<'_>
Auto Trait Implementations§
impl<'ast> !Send for StatementIf<'ast>
impl<'ast> !Sync for StatementIf<'ast>
impl<'ast> Freeze for StatementIf<'ast>
impl<'ast> RefUnwindSafe for StatementIf<'ast>
impl<'ast> Unpin for StatementIf<'ast>
impl<'ast> UnsafeUnpin for StatementIf<'ast>
impl<'ast> UnwindSafe for StatementIf<'ast>
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