Struct resast::stmt::SwitchStmt [−][src]
pub struct SwitchStmt<'a> {
pub discriminant: Expr<'a>,
pub cases: Vec<SwitchCase<'a>>,
}
Expand description
A switch statement
switch (Math.floor(Math.random()) * 10) {
case 1:
break;
case 2:
case 3:
case 4:
return false;
default:
return true;
}
Fields
discriminant: Expr<'a>
cases: Vec<SwitchCase<'a>>
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for SwitchStmt<'a>
impl<'a> Send for SwitchStmt<'a>
impl<'a> Sync for SwitchStmt<'a>
impl<'a> Unpin for SwitchStmt<'a>
impl<'a> UnwindSafe for SwitchStmt<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more