pub enum ReferenceKind {
Variable(Arc<str>),
MethodCall {
class: Arc<str>,
method: Arc<str>,
},
StaticCall {
class: Arc<str>,
method: Arc<str>,
},
PropertyAccess {
class: Arc<str>,
property: Arc<str>,
},
FunctionCall(Arc<str>),
ClassReference(Arc<str>),
ConstantAccess {
class: Arc<str>,
constant: Arc<str>,
},
GlobalConstant(Arc<str>),
}Expand description
The kind of symbol reference that was resolved.
Variants§
Variable(Arc<str>)
A variable reference ($foo).
MethodCall
An instance method call ($obj->method()).
StaticCall
A static method call (Foo::method()).
PropertyAccess
A property access ($obj->prop).
FunctionCall(Arc<str>)
A free function call (foo()).
ClassReference(Arc<str>)
A class reference (new Foo, instanceof Foo, type hints).
ConstantAccess
A class constant access (Config::VERSION, self::CONST, parent::CONST).
GlobalConstant(Arc<str>)
A global constant reference (FOO, \FOO).
Implementations§
Source§impl ReferenceKind
impl ReferenceKind
Sourcepub fn to_name(&self) -> Option<Name>
pub fn to_name(&self) -> Option<Name>
Map to a typed crate::Name, or None for kinds that don’t correspond
to a codebase-level symbol (currently only Variable).
Trait Implementations§
Source§impl Clone for ReferenceKind
impl Clone for ReferenceKind
Source§fn clone(&self) -> ReferenceKind
fn clone(&self) -> ReferenceKind
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 moreAuto Trait Implementations§
impl Freeze for ReferenceKind
impl RefUnwindSafe for ReferenceKind
impl Send for ReferenceKind
impl Sync for ReferenceKind
impl Unpin for ReferenceKind
impl UnsafeUnpin for ReferenceKind
impl UnwindSafe for ReferenceKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more