pub struct ClassDecl {
pub name: Ident,
pub type_params: Vec<TypeParam>,
pub fields: Vec<FieldDecl>,
pub vis: Visibility,
}Expand description
Class declaration: class Widget { ... }
Classes are heap-allocated types with mutable fields, similar to structs but semantically intended for reference-identity objects.
Fields§
§name: IdentName of the class.
type_params: Vec<TypeParam>Generic type parameters.
fields: Vec<FieldDecl>Named fields with types and optional defaults.
vis: VisibilityVisibility qualifier.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClassDecl
impl RefUnwindSafe for ClassDecl
impl Send for ClassDecl
impl Sync for ClassDecl
impl Unpin for ClassDecl
impl UnsafeUnpin for ClassDecl
impl UnwindSafe for ClassDecl
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