#[non_exhaustive]pub struct PropertyDecl {
pub name: Ident,
pub modifiers: Modifiers,
pub type_hint: Option<TypeHint>,
pub default: Option<Expr>,
pub attributes: Box<[Attribute]>,
pub hooks: Box<[PropertyHook]>,
pub empty_hook_list: bool,
pub doc_comment: Option<Comment>,
}Expand description
A property declaration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: IdentProperty name without $.
modifiers: ModifiersVisibility, static, final, abstract and readonly modifiers.
type_hint: Option<TypeHint>Declared type.
default: Option<Expr>Default value.
attributes: Box<[Attribute]>Attributes on the property.
hooks: Box<[PropertyHook]>Property hooks.
empty_hook_list: booltrue for an empty hook list, {}, which PHP rejects.
doc_comment: Option<Comment>Preceding doc comment.
Implementations§
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