pub struct Class {
pub kind: StructureKind,
pub name: Identifier,
pub generics: Vec<GenericParam>,
pub parents: Vec<Parent>,
pub items: Vec<Item>,
pub annotations: Vec<Attribute>,
pub span: Span,
pub is_abstract: bool,
pub is_sealed: bool,
pub is_final: bool,
}Expand description
A class declaration
Fields§
§kind: StructureKindThe keyword kind used for this class (class, struct, structure, widget, trait).
name: IdentifierThe class name.
generics: Vec<GenericParam>Generic parameters for the class.
parents: Vec<Parent>Parent classes or traits this class inherits from.
items: Vec<Item>Items (fields, methods) declared within the class.
annotations: Vec<Attribute>Annotations applied to the class.
span: SpanThe source code span.
is_abstract: boolWhether this class is abstract (cannot be instantiated directly).
is_sealed: boolWhether this class is sealed (restricted inheritance).
is_final: boolWhether this class is final (cannot be inherited).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Class
impl<'de> Deserialize<'de> for Class
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Class
impl StructuralPartialEq for Class
Auto Trait Implementations§
impl Freeze for Class
impl RefUnwindSafe for Class
impl Send for Class
impl Sync for Class
impl Unpin for Class
impl UnsafeUnpin for Class
impl UnwindSafe for Class
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