pub enum RefactoringAction {
IntroduceTrait {
suggested_name: String,
methods: Vec<String>,
},
MoveCloser {
target_location: String,
},
ExtractAdapter {
adapter_name: String,
purpose: String,
},
SplitModule {
suggested_modules: Vec<String>,
},
SimplifyAbstraction {
direct_usage: String,
},
BreakCycle {
suggested_direction: String,
},
StabilizeInterface {
interface_name: String,
},
General {
action: String,
},
AddGetters {
fields: Vec<String>,
},
IntroduceNewtype {
suggested_name: String,
wrapped_type: String,
},
}Expand description
Specific refactoring actions
Variants§
IntroduceTrait
Introduce a trait to abstract the coupling
MoveCloser
Move the component closer (same module/crate)
ExtractAdapter
Extract an interface/adapter
SplitModule
Split a large module
SimplifyAbstraction
Remove unnecessary abstraction
BreakCycle
Break circular dependency
StabilizeInterface
Add stable interface
General
General refactoring suggestion
AddGetters
Add getter methods to replace direct field access
IntroduceNewtype
Introduce newtype pattern for type safety
Trait Implementations§
Source§impl Clone for RefactoringAction
impl Clone for RefactoringAction
Source§fn clone(&self) -> RefactoringAction
fn clone(&self) -> RefactoringAction
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 RefactoringAction
impl Debug for RefactoringAction
Auto Trait Implementations§
impl Freeze for RefactoringAction
impl RefUnwindSafe for RefactoringAction
impl Send for RefactoringAction
impl Sync for RefactoringAction
impl Unpin for RefactoringAction
impl UnsafeUnpin for RefactoringAction
impl UnwindSafe for RefactoringAction
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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