pub enum RecvKind {
None,
This,
SelfRecv,
NamedVariable,
TypeQualified,
FieldOfThis,
FieldOfSelf,
FieldOfVariable,
Super,
StaticType,
Unknown,
}Expand description
How the callee’s receiver was written at the call site.
Captured during extraction (or recovered from the callee string) so
resolution can distinguish this.method() from other.method()
without re-parsing. Field-chain receivers are classified rather than
silently treated as the first identifier.
Variants§
None
This
SelfRecv
NamedVariable
TypeQualified
FieldOfThis
FieldOfSelf
FieldOfVariable
Super
StaticType
Unknown
Implementations§
Source§impl RecvKind
impl RecvKind
pub fn as_str(self) -> &'static str
Sourcepub fn is_instance_self(self) -> bool
pub fn is_instance_self(self) -> bool
Receivers whose method must be a sibling of the enclosing type.
Sourcepub fn is_field_chain(self) -> bool
pub fn is_field_chain(self) -> bool
Receivers that walk through an intermediate field. One-hop
self.x.m() / this.x.m() may pin via a unique field type; longer
chains stay unresolved and must not pretend the intermediate name
is the method.
Trait Implementations§
impl Copy for RecvKind
Source§impl<'de> Deserialize<'de> for RecvKind
impl<'de> Deserialize<'de> for RecvKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RecvKind
impl StructuralPartialEq for RecvKind
Auto Trait Implementations§
impl Freeze for RecvKind
impl RefUnwindSafe for RecvKind
impl Send for RecvKind
impl Sync for RecvKind
impl Unpin for RecvKind
impl UnsafeUnpin for RecvKind
impl UnwindSafe for RecvKind
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