pub enum ClassElement {
Method {
key: PropName,
is_static: bool,
kind: MethodKind,
func: Box<Function>,
span: Span,
},
Field {
key: PropName,
is_static: bool,
value: Option<Box<Expr>>,
span: Span,
},
StaticBlock {
body: Vec<Stmt>,
body_start: Position,
span: Span,
},
}Expand description
One member of a class body.
Variants§
Method
A method (constructor, ordinary, get, set, generator or async).
Fields
§
kind: MethodKindWhich kind of method this is.
Field
A field (x = 1, #x, static x).
Fields
StaticBlock
static { … }
Trait Implementations§
Source§impl Clone for ClassElement
impl Clone for ClassElement
Source§impl Debug for ClassElement
impl Debug for ClassElement
Source§impl PartialEq for ClassElement
impl PartialEq for ClassElement
impl StructuralPartialEq for ClassElement
Auto Trait Implementations§
impl !Send for ClassElement
impl !Sync for ClassElement
impl Forget for ClassElement
impl Freeze for ClassElementwhere
*const RcInner<[u8]> is !null: Freeze,
PhantomData<RcInner<[u8]>>: Freeze,
*const RcInner<Vec<u8>> is !null: Freeze,
PhantomData<RcInner<Vec<u8>>>: Freeze,
*const Expr is !null: Freeze,
PhantomData<Expr>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const Function is !null: Freeze,
PhantomData<Function>: Freeze,
PhantomData<Stmt>: Freeze,
impl Move for ClassElement
impl RefUnwindSafe for ClassElement
impl Unpin for ClassElement
impl UnsafeUnpin for ClassElementwhere
*const RcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<RcInner<[u8]>>: UnsafeUnpin,
*const RcInner<Vec<u8>> is !null: UnsafeUnpin,
PhantomData<RcInner<Vec<u8>>>: UnsafeUnpin,
*const Expr is !null: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Function is !null: UnsafeUnpin,
PhantomData<Function>: UnsafeUnpin,
PhantomData<Stmt>: UnsafeUnpin,
impl UnwindSafe for ClassElementwhere
Rc<[u8]>: UnwindSafe,
Rc<Vec<u8>>: UnwindSafe,
BoxRaw<Expr>: UnwindSafe,
RawVecInner: UnwindSafe,
BoxRaw<Function>: UnwindSafe,
BoxRaw<Stmt>: UnwindSafe,
BoxRaw<RestElement>: UnwindSafe,
BoxRaw<Pattern>: UnwindSafe,
BoxRaw<MemberPattern>: 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