pub struct Rename;Expand description
Rename operation for symbols.
Implementations§
Source§impl Rename
impl Rename
Sourcepub fn apply(ast: &mut RustAST, old_name: &str, new_name: &str) -> RenameResult
pub fn apply(ast: &mut RustAST, old_name: &str, new_name: &str) -> RenameResult
Rename all occurrences of a symbol.
This renames:
- Local variable definitions and uses
- Function definitions and calls
- Struct/enum definitions and uses
Sourcepub fn rename_local_in_fn(
ast: &mut RustAST,
fn_name: &str,
old_name: &str,
new_name: &str,
) -> RenameResult
pub fn rename_local_in_fn( ast: &mut RustAST, fn_name: &str, old_name: &str, new_name: &str, ) -> RenameResult
Rename a local variable within a specific function.
Auto Trait Implementations§
impl Freeze for Rename
impl RefUnwindSafe for Rename
impl Send for Rename
impl Sync for Rename
impl Unpin for Rename
impl UnsafeUnpin for Rename
impl UnwindSafe for Rename
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