pub struct InsertStatementMutation {
pub stmt: PureStmt,
pub target_fn: SymbolId,
pub position: InsertPosition,
pub reference_stmt: Option<PureStmt>,
}Expand description
Insert a statement at a specific position
Fields§
§stmt: PureStmtStatement to insert
target_fn: SymbolIdTarget function SymbolId
position: InsertPositionInsert position
reference_stmt: Option<PureStmt>Reference statement for BeforePattern/AfterPattern. Matched via PartialEq (exact structural match).
Implementations§
Trait Implementations§
Source§impl Clone for InsertStatementMutation
impl Clone for InsertStatementMutation
Source§fn clone(&self) -> InsertStatementMutation
fn clone(&self) -> InsertStatementMutation
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 InsertStatementMutation
impl Debug for InsertStatementMutation
Source§impl Mutation for InsertStatementMutation
impl Mutation for InsertStatementMutation
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 InsertStatementMutation
impl RefUnwindSafe for InsertStatementMutation
impl Send for InsertStatementMutation
impl Sync for InsertStatementMutation
impl Unpin for InsertStatementMutation
impl UnsafeUnpin for InsertStatementMutation
impl UnwindSafe for InsertStatementMutation
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