Enum ra_ap_ide_db::defs::NameClass [−][src]
pub enum NameClass { ExternCrate(Crate), Definition(Definition), ConstReference(Definition), PatFieldShorthand { local_def: Local, field_ref: Definition, }, }
Variants
ExternCrate(Crate)
Definition(Definition)
ConstReference(Definition)
None
in if let None = Some(82) {}
.
field
in if let Foo { field } = foo
.
Show fields
Fields of PatFieldShorthand
local_def: Local
field_ref: Definition
Implementations
impl NameClass
[src]
impl NameClass
[src]pub fn defined(self, db: &dyn HirDatabase) -> Option<Definition>
[src]
pub fn defined(self, db: &dyn HirDatabase) -> Option<Definition>
[src]Definition
defined by this name.
pub fn referenced_or_defined(self, db: &dyn HirDatabase) -> Definition
[src]
pub fn referenced_or_defined(self, db: &dyn HirDatabase) -> Definition
[src]Definition
referenced or defined by this name.
pub fn classify(
sema: &Semantics<'_, RootDatabase>,
name: &Name
) -> Option<NameClass>
[src]
sema: &Semantics<'_, RootDatabase>,
name: &Name
) -> Option<NameClass>
pub fn classify_lifetime(
sema: &Semantics<'_, RootDatabase>,
lifetime: &Lifetime
) -> Option<NameClass>
[src]
sema: &Semantics<'_, RootDatabase>,
lifetime: &Lifetime
) -> Option<NameClass>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NameClass
impl Send for NameClass
impl Sync for NameClass
impl Unpin for NameClass
impl UnwindSafe for NameClass
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]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
.
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Any for T where
T: Any,
T: Any,