Skip to main content

ArgKind

Enum ArgKind 

Source
#[non_exhaustive]
pub enum ArgKind<'arena, 'src> { Value(Expr<'arena, 'src>), Spread(Expr<'arena, 'src>), ByRef(Expr<'arena, 'src>), Placeholder, SpreadPlaceholder, }
Expand description

The form of a call argument.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Value(Expr<'arena, 'src>)

A plain value: f($x), or f(name: $x) when the argument has a name.

§

Spread(Expr<'arena, 'src>)

A spread: f(...$args).

§

ByRef(Expr<'arena, 'src>)

Call-time pass-by-reference: f(&$x), a fatal error since PHP 5.4.

§

Placeholder

The PHP 8.6 partial-application placeholder ?.

§

SpreadPlaceholder

The PHP 8.6 partial-application placeholder ....

Trait Implementations§

Source§

impl<'arena, 'src> Debug for ArgKind<'arena, 'src>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'arena, 'src> Serialize for ArgKind<'arena, 'src>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'arena, 'src> !RefUnwindSafe for ArgKind<'arena, 'src>

§

impl<'arena, 'src> !Send for ArgKind<'arena, 'src>

§

impl<'arena, 'src> !Sync for ArgKind<'arena, 'src>

§

impl<'arena, 'src> !UnwindSafe for ArgKind<'arena, 'src>

§

impl<'arena, 'src> Freeze for ArgKind<'arena, 'src>

§

impl<'arena, 'src> Unpin for ArgKind<'arena, 'src>

§

impl<'arena, 'src> UnsafeUnpin for ArgKind<'arena, 'src>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.