pub enum ClassBodyDecl {
Field(FieldDecl),
Method(MethodDecl),
Constructor(ConstructorDecl),
StaticInit(StaticInit),
InstanceInit(InstanceInit),
Class(ClassDecl),
Interface(InterfaceDecl),
Enum(EnumDecl),
Record(RecordDecl),
AnnotationType(AnnotationInterfaceDecl),
Empty(Span),
}Expand description
A declaration inside a class body.
Variants§
Field(FieldDecl)
A field declaration.
Method(MethodDecl)
A method declaration.
Constructor(ConstructorDecl)
A constructor declaration.
StaticInit(StaticInit)
A static initializer block: static { ... }.
InstanceInit(InstanceInit)
An instance initializer block: { ... }.
Class(ClassDecl)
A nested class declaration.
Interface(InterfaceDecl)
A nested interface declaration.
Enum(EnumDecl)
A nested enum declaration.
Record(RecordDecl)
A nested record declaration.
AnnotationType(AnnotationInterfaceDecl)
A nested annotation type declaration.
Empty(Span)
A semicolon (empty declaration).
Implementations§
Trait Implementations§
Source§impl Clone for ClassBodyDecl
impl Clone for ClassBodyDecl
Source§fn clone(&self) -> ClassBodyDecl
fn clone(&self) -> ClassBodyDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClassBodyDecl
impl Debug for ClassBodyDecl
impl Eq for ClassBodyDecl
Source§impl Hash for ClassBodyDecl
impl Hash for ClassBodyDecl
Source§impl PartialEq for ClassBodyDecl
impl PartialEq for ClassBodyDecl
Source§fn eq(&self, other: &ClassBodyDecl) -> bool
fn eq(&self, other: &ClassBodyDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClassBodyDecl
Auto Trait Implementations§
impl Freeze for ClassBodyDecl
impl RefUnwindSafe for ClassBodyDecl
impl Send for ClassBodyDecl
impl Sync for ClassBodyDecl
impl Unpin for ClassBodyDecl
impl UnsafeUnpin for ClassBodyDecl
impl UnwindSafe for ClassBodyDecl
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