pub struct MoveItemMutation {
pub source: SymbolPath,
pub target: SymbolPath,
pub item_name: String,
pub item_kind: ItemKind,
pub add_use: bool,
}Expand description
Move an item from one module to another
Fields§
§source: SymbolPathSource module as SymbolPath
target: SymbolPathTarget module as SymbolPath
item_name: StringItem name to move
item_kind: ItemKindKind of item to move
add_use: boolWhether to add use statement in source file
Implementations§
Source§impl MoveItemMutation
impl MoveItemMutation
pub fn new( source: SymbolPath, target: SymbolPath, item_name: impl Into<String>, item_kind: ItemKind, add_use: bool, ) -> Self
Trait Implementations§
Source§impl Clone for MoveItemMutation
impl Clone for MoveItemMutation
Source§fn clone(&self) -> MoveItemMutation
fn clone(&self) -> MoveItemMutation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MoveItemMutation
impl Debug for MoveItemMutation
Source§impl Mutation for MoveItemMutation
impl Mutation for MoveItemMutation
Source§fn mutation_type(&self) -> &'static str
fn mutation_type(&self) -> &'static str
Get the mutation type name
Source§fn validate(&self, _file: &PureFile) -> ValidationResult
fn validate(&self, _file: &PureFile) -> ValidationResult
Validate the mutation before applying Read more
Source§fn can_proceed(&self, file: &PureFile, strategy: ValidationStrategy) -> bool
fn can_proceed(&self, file: &PureFile, strategy: ValidationStrategy) -> bool
Check if this mutation can proceed with the given strategy
Auto Trait Implementations§
impl Freeze for MoveItemMutation
impl RefUnwindSafe for MoveItemMutation
impl Send for MoveItemMutation
impl Sync for MoveItemMutation
impl Unpin for MoveItemMutation
impl UnsafeUnpin for MoveItemMutation
impl UnwindSafe for MoveItemMutation
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