#[non_exhaustive]pub struct PropertyHook {
pub kind: PropertyHookKind,
pub body: PropertyHookBody,
pub modifiers: Modifiers,
pub by_ref: bool,
pub params: Box<[Param]>,
pub attributes: Box<[Attribute]>,
pub span: Span,
}Expand description
A property get or set hook.
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: PropertyHookKindget or set.
body: PropertyHookBodyHook body.
modifiers: ModifiersVisibility, static, final, abstract and readonly modifiers.
by_ref: boolWhether it returns by reference.
params: Box<[Param]>Parameters of a set hook.
attributes: Box<[Attribute]>Attributes on the hook.
span: SpanSource span.
Implementations§
Source§impl PropertyHook
impl PropertyHook
Sourcepub fn new(kind: PropertyHookKind, body: PropertyHookBody, span: Span) -> Self
pub fn new(kind: PropertyHookKind, body: PropertyHookBody, 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 Clone for PropertyHook
impl Clone for PropertyHook
Source§impl Debug for PropertyHook
impl Debug for PropertyHook
Auto Trait Implementations§
impl Freeze for PropertyHook
impl RefUnwindSafe for PropertyHook
impl Send for PropertyHook
impl Sync for PropertyHook
impl Unpin for PropertyHook
impl UnsafeUnpin for PropertyHook
impl UnwindSafe for PropertyHook
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