#[non_exhaustive]pub struct PropertyHook<'arena, 'src> {
pub kind: PropertyHookKind,
pub body: PropertyHookBody<'arena, 'src>,
pub modifiers: Modifiers,
pub by_ref: bool,
pub params: ArenaVec<'arena, Param<'arena, 'src>>,
pub attributes: ArenaVec<'arena, Attribute<'arena, 'src>>,
pub span: Span,
}Expand description
A property hook: get { ... } or set => ... (PHP 8.4+).
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.kind: PropertyHookKindWhether this is a get or set hook.
body: PropertyHookBody<'arena, 'src>Hook body.
modifiers: ModifiersVisibility, static, final, abstract and readonly modifiers.
by_ref: booltrue for &get.
params: ArenaVec<'arena, Param<'arena, 'src>>Explicit parameters, e.g. set(string $v).
attributes: ArenaVec<'arena, Attribute<'arena, 'src>>#[...] attributes applied to this node.
span: SpanSource range of this node.
Implementations§
Source§impl<'arena, 'src> PropertyHook<'arena, 'src>
impl<'arena, 'src> PropertyHook<'arena, 'src>
Sourcepub fn new(
arena: &'arena Bump,
kind: PropertyHookKind,
body: PropertyHookBody<'arena, 'src>,
span: Span,
) -> Self
pub fn new( arena: &'arena Bump, kind: PropertyHookKind, body: PropertyHookBody<'arena, 'src>, span: Span, ) -> Self
Builds a PropertyHook from its identifying fields with every other field empty. Set
the rest by assignment, as with Param::new.
Trait Implementations§
Source§impl<'arena, 'src> Debug for PropertyHook<'arena, 'src>
impl<'arena, 'src> Debug for PropertyHook<'arena, 'src>
Auto Trait Implementations§
impl<'arena, 'src> !RefUnwindSafe for PropertyHook<'arena, 'src>
impl<'arena, 'src> !Send for PropertyHook<'arena, 'src>
impl<'arena, 'src> !Sync for PropertyHook<'arena, 'src>
impl<'arena, 'src> !UnwindSafe for PropertyHook<'arena, 'src>
impl<'arena, 'src> Freeze for PropertyHook<'arena, 'src>
impl<'arena, 'src> Unpin for PropertyHook<'arena, 'src>
impl<'arena, 'src> UnsafeUnpin for PropertyHook<'arena, 'src>
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