#[non_exhaustive]pub enum ReceiverKind {
SelfReceiver,
ObjectVariable,
StaticPackage,
HashSlot,
HashRefSlot,
ArrayIndex,
DynamicKey,
Unknown,
}Expand description
Receiver shape recognized for a method call.
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.
SelfReceiver
A $self or $this receiver.
ObjectVariable
A scalar object receiver such as $object.
StaticPackage
A static package receiver such as Class->new.
HashSlot
A hash slot receiver such as $hash{key}.
HashRefSlot
A hash-reference slot receiver such as $hashref->{key}.
ArrayIndex
An array index receiver such as $array[0].
DynamicKey
A receiver with a runtime-computed slot key.
Unknown
A receiver that cannot be classified statically.
Trait Implementations§
Source§impl Clone for ReceiverKind
impl Clone for ReceiverKind
Source§fn clone(&self) -> ReceiverKind
fn clone(&self) -> ReceiverKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReceiverKind
impl Debug for ReceiverKind
impl Eq for ReceiverKind
Source§impl PartialEq for ReceiverKind
impl PartialEq for ReceiverKind
Source§fn eq(&self, other: &ReceiverKind) -> bool
fn eq(&self, other: &ReceiverKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReceiverKind
Auto Trait Implementations§
impl Freeze for ReceiverKind
impl RefUnwindSafe for ReceiverKind
impl Send for ReceiverKind
impl Sync for ReceiverKind
impl Unpin for ReceiverKind
impl UnsafeUnpin for ReceiverKind
impl UnwindSafe for ReceiverKind
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