pub struct SwitchStatement<'s> {
pub switch: &'s Token<'s>,
pub open_condition: &'s Token<'s>,
pub condition: Box<Expression<'s>>,
pub close_condition: &'s Token<'s>,
pub open_cases: &'s Token<'s>,
pub cases: Vec<SwitchCase<'s>>,
pub close_cases: &'s Token<'s>,
}
Expand description
A switch
statement.
Grammar: switch
(
Expression )
{
SwitchCase* }
Fields§
§switch: &'s Token<'s>
§open_condition: &'s Token<'s>
§condition: Box<Expression<'s>>
§close_condition: &'s Token<'s>
§open_cases: &'s Token<'s>
§cases: Vec<SwitchCase<'s>>
§close_cases: &'s Token<'s>
Trait Implementations§
Source§impl<'s> Clone for SwitchStatement<'s>
impl<'s> Clone for SwitchStatement<'s>
Source§fn clone(&self) -> SwitchStatement<'s>
fn clone(&self) -> SwitchStatement<'s>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'s> Freeze for SwitchStatement<'s>
impl<'s> RefUnwindSafe for SwitchStatement<'s>
impl<'s> Send for SwitchStatement<'s>
impl<'s> Sync for SwitchStatement<'s>
impl<'s> Unpin for SwitchStatement<'s>
impl<'s> UnwindSafe for SwitchStatement<'s>
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