pub struct InsertInspectMutation {
pub after_method: String,
pub marker: DebugMarker,
pub var_name: String,
pub in_function: Option<String>,
}Expand description
Fields§
§after_method: StringMethod name after which to insert inspect.
marker: DebugMarkerDebug marker for tracking this insertion.
var_name: StringVariable name to use in the closure (default: “_x”).
in_function: Option<String>Only insert in function with this name (if specified).
Implementations§
Source§impl InsertInspectMutation
impl InsertInspectMutation
Sourcepub fn new(after_method: impl Into<String>, marker: DebugMarker) -> Self
pub fn new(after_method: impl Into<String>, marker: DebugMarker) -> Self
Create a new mutation to insert inspect after a method.
Sourcepub fn with_var_name(self, name: impl Into<String>) -> Self
pub fn with_var_name(self, name: impl Into<String>) -> Self
Set the variable name for the inspect closure.
Sourcepub fn in_function(self, name: impl Into<String>) -> Self
pub fn in_function(self, name: impl Into<String>) -> Self
Only apply in a specific function.
Sourcepub fn transform_fn(&self, func: &PureFn) -> (PureFn, usize)
pub fn transform_fn(&self, func: &PureFn) -> (PureFn, usize)
Transform a function.
Trait Implementations§
Source§impl Clone for InsertInspectMutation
impl Clone for InsertInspectMutation
Source§fn clone(&self) -> InsertInspectMutation
fn clone(&self) -> InsertInspectMutation
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 InsertInspectMutation
impl Debug for InsertInspectMutation
Source§impl Mutation for InsertInspectMutation
impl Mutation for InsertInspectMutation
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 InsertInspectMutation
impl RefUnwindSafe for InsertInspectMutation
impl Send for InsertInspectMutation
impl Sync for InsertInspectMutation
impl Unpin for InsertInspectMutation
impl UnsafeUnpin for InsertInspectMutation
impl UnwindSafe for InsertInspectMutation
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