Enum ra_ap_ide_db::defs::Definition [−][src]
pub enum Definition {
Macro(MacroDef),
Field(Field),
ModuleDef(ModuleDef),
SelfType(Impl),
Local(Local),
GenericParam(GenericParam),
Label(Label),
}
Variants
Macro(MacroDef)
Tuple Fields of Macro
0: MacroDef
Field(Field)
Tuple Fields of Field
0: Field
ModuleDef(ModuleDef)
Tuple Fields of ModuleDef
0: ModuleDef
SelfType(Impl)
Tuple Fields of SelfType
0: Impl
Local(Local)
Tuple Fields of Local
0: Local
GenericParam(GenericParam)
Tuple Fields of GenericParam
0: GenericParam
Label(Label)
Tuple Fields of Label
0: Label
Implementations
pub fn rename(
&self,
sema: &Semantics<'_, RootDatabase>,
new_name: &str
) -> Result<SourceChange>
Textual range of the identifier which will change when renaming this
Definition
. Note that some definitions, like buitin types, can’t be
renamed.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnwindSafe for Definition
Blanket Implementations
Mutably borrows from an owned value. Read more
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
.
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more