pub struct PropertyDecl {
pub name: Ident,
pub visibility: Option<Visibility>,
pub set_visibility: Option<Visibility>,
pub is_static: bool,
pub is_readonly: bool,
pub type_hint: Option<TypeHint>,
pub default: Option<Expr>,
pub attributes: Box<[Attribute]>,
pub hooks: Box<[PropertyHook]>,
pub doc_comment: Option<Comment>,
}Expand description
A property declaration.
Fields§
§name: IdentProperty name without $.
visibility: Option<Visibility>Read visibility.
set_visibility: Option<Visibility>Asymmetric set visibility.
is_static: boolWhether static.
is_readonly: boolWhether readonly.
type_hint: Option<TypeHint>Declared type.
default: Option<Expr>Default value.
attributes: Box<[Attribute]>Attributes on the property.
hooks: Box<[PropertyHook]>Property hooks.
doc_comment: Option<Comment>Preceding doc comment.
Trait Implementations§
Source§impl Clone for PropertyDecl
impl Clone for PropertyDecl
Source§impl Debug for PropertyDecl
impl Debug for PropertyDecl
Auto Trait Implementations§
impl Freeze for PropertyDecl
impl RefUnwindSafe for PropertyDecl
impl Send for PropertyDecl
impl Sync for PropertyDecl
impl Unpin for PropertyDecl
impl UnsafeUnpin for PropertyDecl
impl UnwindSafe for PropertyDecl
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