pub enum RefactoringType {
SymbolRename {
old_name: String,
new_name: String,
scope: RefactoringScope,
},
ExtractMethod {
method_name: String,
start_position: (usize, usize),
end_position: (usize, usize),
},
MoveCode {
source_file: PathBuf,
target_file: PathBuf,
elements: Vec<String>,
},
Modernize {
patterns: Vec<ModernizationPattern>,
},
OptimizeImports {
remove_unused: bool,
sort_alphabetically: bool,
group_by_type: bool,
},
Inline {
symbol_name: String,
all_occurrences: bool,
},
}Expand description
Refactoring engine types: configuration, operations, and results. Types of refactoring operations supported by the engine
Variants§
SymbolRename
Rename symbols across workspace
Fields
§
scope: RefactoringScopeScope of the rename operation
ExtractMethod
Extract methods from existing code
Fields
MoveCode
Move code between files
Fields
Modernize
Modernize legacy code patterns
Fields
§
patterns: Vec<ModernizationPattern>Modernization patterns to apply
OptimizeImports
Optimize imports across files
Fields
Inline
Inline variables or methods
Trait Implementations§
Source§impl Clone for RefactoringType
impl Clone for RefactoringType
Source§fn clone(&self) -> RefactoringType
fn clone(&self) -> RefactoringType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RefactoringType
impl Debug for RefactoringType
Source§impl<'de> Deserialize<'de> for RefactoringType
impl<'de> Deserialize<'de> for RefactoringType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RefactoringType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RefactoringType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RefactoringType
impl Serialize for RefactoringType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for RefactoringType
impl RefUnwindSafe for RefactoringType
impl Send for RefactoringType
impl Sync for RefactoringType
impl Unpin for RefactoringType
impl UnsafeUnpin for RefactoringType
impl UnwindSafe for RefactoringType
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