pub enum RenameTarget {
Callable,
Signal,
Type,
Value,
Unresolved,
}Expand description
What the index resolved the rename target to be.
Grammars distinguish a declaration from a reference far more often than they
distinguish two same-named declarations, so this is the only input that lets
the walk tell fn count() from struct S { count: usize }. It comes from
the indexed symbol’s kind, and RenameTarget::Unresolved — the default
when nothing resolved — accepts every identifier kind, which is exactly the
behaviour before this existed.
Variants§
Callable
A function or method.
Signal
A GDScript signal. Declared and connected by name, but never a
function, and the two have distinct declaration nodes.
Type
A type-level name: struct, enum, trait, class, interface, type alias.
Value
A value binding: const, static, or variable.
Unresolved
Unresolved, or an indexed kind that maps to none of the above.
Implementations§
Source§impl RenameTarget
impl RenameTarget
Sourcepub fn from_indexed_kind(kind: &str) -> Self
pub fn from_indexed_kind(kind: &str) -> Self
Map an indexed symbol kind onto what the grammar can check.
The input strings are the capture names in Lang::symbol_query, so an
unrecognized one means a new capture was added without deciding what it
is. That falls to Unresolved, which is the permissive answer — a new
symbol kind must not silently start dropping occurrences.
Trait Implementations§
Source§impl Clone for RenameTarget
impl Clone for RenameTarget
Source§fn clone(&self) -> RenameTarget
fn clone(&self) -> RenameTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more