pub struct WrapExprMutation {
pub target_expr: PureExpr,
pub wrapper_macro: String,
pub target_fn: SymbolId,
pub wrap_all: bool,
}Expand description
Wrap an expression with a macro call (e.g., dbg!, Some, Ok)
Fields§
§target_expr: PureExprThe expression to wrap (matched by structure)
wrapper_macro: StringThe wrapper macro name (e.g., “dbg”, “Some”, “Ok”)
target_fn: SymbolIdTarget function SymbolId
wrap_all: boolWrap all occurrences (true) or just first (false)
Implementations§
Trait Implementations§
Source§impl Clone for WrapExprMutation
impl Clone for WrapExprMutation
Source§fn clone(&self) -> WrapExprMutation
fn clone(&self) -> WrapExprMutation
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 WrapExprMutation
impl Debug for WrapExprMutation
Source§impl Mutation for WrapExprMutation
impl Mutation for WrapExprMutation
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 WrapExprMutation
impl RefUnwindSafe for WrapExprMutation
impl Send for WrapExprMutation
impl Sync for WrapExprMutation
impl Unpin for WrapExprMutation
impl UnsafeUnpin for WrapExprMutation
impl UnwindSafe for WrapExprMutation
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