Struct syn::ExprIf [−][src]
An if
expression with an optional else
block: if expr { ... } else { ... }
.
The else
branch expression may only be an If
, IfLet
, or
Block
expression, not any of the other types of expression.
This type is available if Syn is built with the "full"
feature.
Fields
attrs: Vec<Attribute>
if_token: If
cond: Box<Expr>
then_branch: Block
else_branch: Option<(Else, Box<Expr>)>
Trait Implementations
impl Synom for ExprIf
[src]
[+]
impl Synom for ExprIf
impl ToTokens for ExprIf
[src]
[+]
impl ToTokens for ExprIf
impl Clone for ExprIf
[src]
[+]
impl Clone for ExprIf
impl From<ExprIf> for Expr
[src]
[+]
impl From<ExprIf> for Expr