Enum ra_ap_ide_db::defs::NameRefClass
source · [−]pub enum NameRefClass {
Definition(Definition),
FieldShorthand {
local_ref: Local,
field_ref: Field,
},
}
Expand description
This is similar to NameClass
, but works for ast::NameRef
rather than
for ast::Name
. Similarly, what looks like a reference in syntax is a
reference most of the time, but there are a couple of annoying exceptions.
A model special case is field shorthand syntax, which uses a single reference to point to two different defs.
Variants
Definition(Definition)
FieldShorthand
Implementations
sourceimpl NameRefClass
impl NameRefClass
pub fn classify(
sema: &Semantics<'_, RootDatabase>,
name_ref: &NameRef
) -> Option<NameRefClass>
pub fn classify_lifetime(
sema: &Semantics<'_, RootDatabase>,
lifetime: &Lifetime
) -> Option<NameRefClass>
pub fn classify_derive(
sema: &Semantics<'_, RootDatabase>,
attr: &Attr,
ident: &Ident
) -> Option<NameRefClass>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NameRefClass
impl Send for NameRefClass
impl Sync for NameRefClass
impl Unpin for NameRefClass
impl UnwindSafe for NameRefClass
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Cast for T
impl<T> Cast for T
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more