pub struct IfBranch {
pub condition: Spanned<Expr>,
pub then_branch: Spanned<Expr>,
pub trailing_comments: Vec<Spanned<Comment>>,
}Expand description
A single branch of an if-else chain: if <condition> then <then_branch>.
trailing_comments captures any comments that appear after then_branch
and before the following else keyword. elm-format emits them as
trailing comments on the branch body.
Fields§
§condition: Spanned<Expr>§then_branch: Spanned<Expr>§trailing_comments: Vec<Spanned<Comment>>Trait Implementations§
impl Eq for IfBranch
impl StructuralPartialEq for IfBranch
Auto Trait Implementations§
impl Freeze for IfBranch
impl RefUnwindSafe for IfBranch
impl Send for IfBranch
impl Sync for IfBranch
impl Unpin for IfBranch
impl UnsafeUnpin for IfBranch
impl UnwindSafe for IfBranch
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