pub struct ReplaceExprMutation {
pub old_expr: PureExpr,
pub new_expr: PureExpr,
pub target_fn: SymbolId,
pub replace_all: bool,
}Expand description
Replace an expression with another expression
Fields§
§old_expr: PureExprThe expression to find (matched by structure)
new_expr: PureExprThe replacement expression
target_fn: SymbolIdTarget function SymbolId
replace_all: boolReplace all occurrences (true) or just first (false)
Implementations§
Trait Implementations§
Source§impl Clone for ReplaceExprMutation
impl Clone for ReplaceExprMutation
Source§fn clone(&self) -> ReplaceExprMutation
fn clone(&self) -> ReplaceExprMutation
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 ReplaceExprMutation
impl Debug for ReplaceExprMutation
Source§impl Mutation for ReplaceExprMutation
impl Mutation for ReplaceExprMutation
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 ReplaceExprMutation
impl RefUnwindSafe for ReplaceExprMutation
impl Send for ReplaceExprMutation
impl Sync for ReplaceExprMutation
impl Unpin for ReplaceExprMutation
impl UnsafeUnpin for ReplaceExprMutation
impl UnwindSafe for ReplaceExprMutation
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