pub struct RenameIntent {
pub name: String,
pub to: String,
pub symbol: Option<SymbolKind>,
pub language: Option<LanguageId>,
pub declared_in: Option<RelPath>,
pub selection: Selection,
}Expand description
Rename the declaration(s) called name and every identifier that spells it.
Resolution is syntactic: every occurrence of the identifier in files of
the declaring language is an occurrence. The selection is how a human or
agent excludes the ones that are not the same symbol.
Fields§
§name: String§to: String§symbol: Option<SymbolKind>§language: Option<LanguageId>§declared_in: Option<RelPath>The file declaring the symbol meant, when several share the name.
selection: SelectionImplementations§
Source§impl RenameIntent
impl RenameIntent
pub fn new(name: impl Into<String>, to: impl Into<String>) -> Self
pub fn declared_in(self, path: impl Into<RelPath>) -> Self
pub fn of_symbol(self, symbol: SymbolKind) -> Self
pub fn in_language(self, language: impl Into<LanguageId>) -> Self
pub fn selecting(self, selection: Selection) -> Self
Sourcepub fn references(&self) -> ReferencesQuery
pub fn references(&self) -> ReferencesQuery
The question a rename asks before it plans.
Trait Implementations§
Source§impl Clone for RenameIntent
impl Clone for RenameIntent
Source§impl Command for RenameIntent
Plan a rename. Nothing is written; see Apply.
impl Command for RenameIntent
Plan a rename. Nothing is written; see Apply.
Occurrences are gathered only from the languages in which a matching
declaration exists, so a Rust foo never touches a TypeScript foo.
Source§impl Debug for RenameIntent
impl Debug for RenameIntent
Source§impl<'de> Deserialize<'de> for RenameIntent
impl<'de> Deserialize<'de> for RenameIntent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RenameIntent
Source§impl From<RenameIntent> for Intent
impl From<RenameIntent> for Intent
Source§fn from(i: RenameIntent) -> Self
fn from(i: RenameIntent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RenameIntent
impl PartialEq for RenameIntent
Source§impl Serialize for RenameIntent
impl Serialize for RenameIntent
impl StructuralPartialEq for RenameIntent
Auto Trait Implementations§
impl Freeze for RenameIntent
impl RefUnwindSafe for RenameIntent
impl Send for RenameIntent
impl Sync for RenameIntent
impl Unpin for RenameIntent
impl UnsafeUnpin for RenameIntent
impl UnwindSafe for RenameIntent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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