Expand description
Basic AST mutations: add, remove, rename, change visibility
These are fundamental building blocks for code transformations.
Re-exports§
pub use trait_ops::EnumToTraitMutation;pub use trait_ops::EnumToTraitStrategy;pub use trait_ops::ExtractTraitMutation;pub use trait_ops::FieldInfo;pub use trait_ops::InlineTraitMutation;pub use trait_ops::MatchHandling;pub use trait_ops::RemoveTraitMutation;pub use trait_ops::VariantInfo;
Modules§
- stmt
- Statement-level mutations for PureStmt/PureExpr operations
- trait_
ops - Trait mutations: ExtractTraitMutation, InlineTraitMutation, RemoveTraitMutation, EnumToTraitMutation
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
- 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
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
Code Mutation - Replace an item by SymbolId with raw source bytes, routed through
PureItem::Verbatimso trivia (line comments, blank lines, DSL macro spacing) survives the codegen round-trip. - Replace
Match ArmMutation - Replace a match arm (pattern + body) in an existing match expression