Expand description
Basic AST mutations: add, remove, rename, change visibility
These are fundamental building blocks for code transformations.
Modules§
- stmt
- Statement-level mutations for PureStmt/PureExpr operations
Structs§
- AddConst
Mutation - Add a constant to the file
- AddDerive
Mutation - Add a derive macro to a struct or enum
- AddEnum
Mutation - Add a new enum to the file
- AddField
Mutation - Add a field to an existing struct
- AddFunction
Mutation - Add a new function to the file
- AddImpl
Mutation - Add an impl block for a type
- AddItem
Mutation - Add an item from raw source code content
- AddMatch
ArmMutation - Add a match arm to an existing match expression in a function
- AddMethod
Mutation - Add a method to a struct or enum
- AddPure
Items Mutation - Add multiple items directly from AST (no parsing overhead)
- AddStruct
Literal Field Mutation - Add a field to all struct literals of a given struct type
- AddStruct
Mutation - Add a new struct to the file
- AddType
Alias Mutation - Add a type alias to the file
- AddUse
Mutation - Add a use statement to the file
- AddVariant
Mutation - Add a variant to an existing enum
- Change
Visibility Mutation - Change visibility of an item or struct field
- Create
ModMutation - Create a new module with content
- Enum
ToTrait Mutation - Convert an enum to a trait with struct implementations
- Extract
Trait Mutation - Extract a trait from an impl block
- Field
Info - Field information for struct variants
- Inline
Trait Mutation - Inline a trait back into a struct (remove trait, make inherent impl)
- Move
Item Mutation - Move an item from one module to another
- Remove
Const Mutation - Remove a constant from the file
- Remove
Derive Mutation - Remove a derive macro from a struct or enum
- Remove
Enum Mutation - Remove an enum from the file
- Remove
Field Mutation - Remove a field from a struct
- Remove
Function Mutation - Remove a function from the file
- Remove
Impl Mutation - Remove an impl block from the file
- Remove
Item Mutation - Remove an item by SymbolId
- Remove
Match ArmMutation - Remove a match arm from an existing match expression in a function
- Remove
Method Mutation - Remove a method from a struct or enum
- Remove
ModMutation - Remove a module declaration from the file
- Remove
Struct Literal Field Mutation - Remove a field from all struct literals of a given struct type
- Remove
Struct Mutation - Remove a struct from the file
- Remove
Trait Mutation - Remove a trait from the file
- Remove
Type Alias Mutation - Remove a type alias from the file
- Remove
UseMutation - Remove a use statement from the file
- Remove
Variant Mutation - Remove a variant from an enum
- Rename
Mutation - Rename a symbol across the file
- Replace
Match ArmMutation - Replace a match arm (pattern + body) in an existing match expression
- Variant
Info - Information about an enum variant for conversion
Enums§
- Enum
ToTrait Strategy - Strategy for enum-to-trait conversion
- Match
Handling - How to handle match expressions on the converted enum