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>,
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 Forget for ClassElement
impl Freeze for ClassElement
impl Move for ClassElement
impl RefUnwindSafe for ClassElement
impl Send for ClassElement
impl Sync for ClassElement
impl Unpin for ClassElement
impl UnsafeUnpin for ClassElement
impl UnwindSafe for ClassElement
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