pub struct Param {Show 13 fields
pub name: Ident,
pub type_hint: Option<TypeHint>,
pub default: Option<Expr>,
pub by_ref: bool,
pub variadic: bool,
pub is_readonly: bool,
pub is_final: bool,
pub visibility: Option<Visibility>,
pub set_visibility: Option<Visibility>,
pub attributes: Box<[Attribute]>,
pub hooks: Box<[PropertyHook]>,
pub doc_comment: Option<Comment>,
pub span: Span,
}Expand description
A function or method parameter.
Fields§
§name: IdentParameter name without $.
type_hint: Option<TypeHint>Declared type.
default: Option<Expr>Default value.
by_ref: boolWhether passed by reference.
variadic: boolWhether variadic (...).
is_readonly: boolWhether a readonly promoted property.
is_final: boolWhether a final promoted property.
visibility: Option<Visibility>Promotion visibility.
set_visibility: Option<Visibility>Asymmetric set visibility of a promoted property.
attributes: Box<[Attribute]>Attributes on the parameter.
hooks: Box<[PropertyHook]>Property hooks of a promoted property.
doc_comment: Option<Comment>Preceding doc comment.
span: SpanSource span.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Param
impl RefUnwindSafe for Param
impl Send for Param
impl Sync for Param
impl Unpin for Param
impl UnsafeUnpin for Param
impl UnwindSafe for Param
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