pub enum ClassMember<'ast> {
Property {
attributes: &'ast [AttributeGroup<'ast>],
modifiers: &'ast [Token],
ty: Option<&'ast Type<'ast>>,
entries: &'ast [PropertyEntry<'ast>],
doc_comment: Option<Span>,
span: Span,
},
PropertyHook {
attributes: &'ast [AttributeGroup<'ast>],
modifiers: &'ast [Token],
ty: Option<&'ast Type<'ast>>,
name: &'ast Token,
default: Option<ExprId<'ast>>,
hooks: &'ast [PropertyHook<'ast>],
doc_comment: Option<Span>,
span: Span,
},
Method {
attributes: &'ast [AttributeGroup<'ast>],
modifiers: &'ast [Token],
name: &'ast Token,
params: &'ast [Param<'ast>],
return_type: Option<&'ast Type<'ast>>,
body: &'ast [StmtId<'ast>],
doc_comment: Option<Span>,
span: Span,
},
Const {
attributes: &'ast [AttributeGroup<'ast>],
modifiers: &'ast [Token],
ty: Option<&'ast Type<'ast>>,
consts: &'ast [ClassConst<'ast>],
doc_comment: Option<Span>,
span: Span,
},
TraitUse {
attributes: &'ast [AttributeGroup<'ast>],
traits: &'ast [Name<'ast>],
adaptations: &'ast [TraitAdaptation<'ast>],
doc_comment: Option<Span>,
span: Span,
},
Case {
attributes: &'ast [AttributeGroup<'ast>],
name: &'ast Token,
value: Option<ExprId<'ast>>,
doc_comment: Option<Span>,
span: Span,
},
}Variants§
Property
PropertyHook
Method
Fields
§
attributes: &'ast [AttributeGroup<'ast>]Const
TraitUse
Case
Trait Implementations§
Source§impl<'ast> Clone for ClassMember<'ast>
impl<'ast> Clone for ClassMember<'ast>
Source§fn clone(&self) -> ClassMember<'ast>
fn clone(&self) -> ClassMember<'ast>
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 moreSource§impl<'ast> Debug for ClassMember<'ast>
impl<'ast> Debug for ClassMember<'ast>
Source§impl<'ast> Serialize for ClassMember<'ast>
impl<'ast> Serialize for ClassMember<'ast>
impl<'ast> Copy for ClassMember<'ast>
Auto Trait Implementations§
impl<'ast> Freeze for ClassMember<'ast>
impl<'ast> RefUnwindSafe for ClassMember<'ast>
impl<'ast> Send for ClassMember<'ast>
impl<'ast> Sync for ClassMember<'ast>
impl<'ast> Unpin for ClassMember<'ast>
impl<'ast> UnwindSafe for ClassMember<'ast>
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