pub struct MatchToIfLetMutation {
pub target_fn: Option<SymbolId>,
}Expand description
Fields§
§target_fn: Option<SymbolId>Target function SymbolId. If None, applies to all functions.
Implementations§
Source§impl MatchToIfLetMutation
impl MatchToIfLetMutation
pub fn new() -> Self
pub fn in_function(self, id: SymbolId) -> Self
pub fn transform_block(&self, block: &mut PureBlock) -> usize
Trait Implementations§
Source§impl Clone for MatchToIfLetMutation
impl Clone for MatchToIfLetMutation
Source§fn clone(&self) -> MatchToIfLetMutation
fn clone(&self) -> MatchToIfLetMutation
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 MatchToIfLetMutation
impl Debug for MatchToIfLetMutation
Source§impl Default for MatchToIfLetMutation
impl Default for MatchToIfLetMutation
Source§fn default() -> MatchToIfLetMutation
fn default() -> MatchToIfLetMutation
Returns the “default value” for a type. Read more
Source§impl Mutation for MatchToIfLetMutation
impl Mutation for MatchToIfLetMutation
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 MatchToIfLetMutation
impl RefUnwindSafe for MatchToIfLetMutation
impl Send for MatchToIfLetMutation
impl Sync for MatchToIfLetMutation
impl Unpin for MatchToIfLetMutation
impl UnsafeUnpin for MatchToIfLetMutation
impl UnwindSafe for MatchToIfLetMutation
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