#[non_exhaustive]pub struct Arg {
pub name: Option<Name>,
pub kind: ArgKind,
pub span: Span,
}Expand description
A call argument.
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: Option<Name>Name of a named argument.
kind: ArgKindWhat the argument passes.
span: SpanSource span.
Implementations§
Source§impl Arg
impl Arg
Sourcepub fn value_mut(&mut self) -> Option<&mut Expr>
pub fn value_mut(&mut self) -> Option<&mut Expr>
Mutable access to the argument expression; None for a placeholder.
Sourcepub fn is_spread(&self) -> bool
pub fn is_spread(&self) -> bool
Whether the argument is a ... spread (not the ... placeholder).
Sourcepub fn is_placeholder(&self) -> bool
pub fn is_placeholder(&self) -> bool
Whether the argument is a PHP 8.6 ? or ... placeholder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Arg
impl RefUnwindSafe for Arg
impl Send for Arg
impl Sync for Arg
impl Unpin for Arg
impl UnsafeUnpin for Arg
impl UnwindSafe for Arg
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