pub struct SwitchCase {
pub test: Option<Box<Expr>>,
pub body: Vec<Stmt>,
pub span: Span,
}Expand description
One case/default clause.
Fields§
§test: Option<Box<Expr>>Case selector; None for default.
body: Vec<Stmt>Statements of the clause.
span: SpanSource range of the whole clause.
Trait Implementations§
Source§impl Clone for SwitchCase
impl Clone for SwitchCase
Source§impl Debug for SwitchCase
impl Debug for SwitchCase
Source§impl PartialEq for SwitchCase
impl PartialEq for SwitchCase
impl StructuralPartialEq for SwitchCase
Auto Trait Implementations§
impl Forget for SwitchCase
impl Freeze for SwitchCase
impl Move for SwitchCase
impl RefUnwindSafe for SwitchCase
impl Send for SwitchCasewhere
BoxRaw<Expr>: Send,
RawVecInner: Send,
BoxRaw<Stmt>: Send,
BoxRaw<RestElement>: Send,
BoxRaw<Pattern>: Send,
BoxRaw<MemberPattern>: Send,
BoxRaw<Function>: Send,
BoxRaw<Class>: Send,
BoxRaw<ImportDecl>: Send,
BoxRaw<ExportDecl>: Send,
impl Sync for SwitchCasewhere
BoxRaw<Expr>: Sync,
RawVecInner: Sync,
BoxRaw<Stmt>: Sync,
BoxRaw<RestElement>: Sync,
BoxRaw<Pattern>: Sync,
BoxRaw<MemberPattern>: Sync,
BoxRaw<Function>: Sync,
BoxRaw<Class>: Sync,
BoxRaw<ImportDecl>: Sync,
BoxRaw<ExportDecl>: Sync,
impl Unpin for SwitchCase
impl UnsafeUnpin for SwitchCasewhere
*const Expr is !null: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Stmt>: UnsafeUnpin,
impl UnwindSafe for SwitchCasewhere
BoxRaw<Expr>: UnwindSafe,
RawVecInner: UnwindSafe,
BoxRaw<Stmt>: UnwindSafe,
BoxRaw<RestElement>: UnwindSafe,
BoxRaw<Pattern>: UnwindSafe,
BoxRaw<MemberPattern>: UnwindSafe,
BoxRaw<Function>: UnwindSafe,
BoxRaw<Class>: UnwindSafe,
BoxRaw<ImportDecl>: UnwindSafe,
BoxRaw<ExportDecl>: UnwindSafe,
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