Skip to main content

Module operations

Module operations 

Source
Expand description

Data types for all refactoring operations: add, remove, rename, update, transform, and batch. Defines EditMode, BackupNode, and the operation result types.

Structs§

AddCallArgOp
Add an argument to function or method calls
AddDeriveOp
AddDocCommentOp
Add documentation comment to an item
AddEnumVariantOp
AddImplMethodOp
AddMatchArmOp
AddStructFieldOp
AddStructLiteralFieldOp
AddUseStatementOp
BackupNode
Backup of a single AST node before modification
BatchSpec
FieldLocation
Location of a field in the codebase
InspectResult
Result of inspecting/listing AST nodes
ModificationResult
Result of applying an operation
NodeLocation
RemoveCallArgOp
Remove an argument at a specific index from function or method calls
RemoveDocCommentOp
Remove documentation comment from an item
RemoveEnumVariantOp
RemoveMatchArmOp
RemoveStructFieldOp
RenameEnumVariantOp
Rename an enum variant across the codebase
RenameFunctionOp
Rename a function across the codebase
SetStructLiteralBaseOp
Add or set the base expression (..expr) on struct literals e.g., adds ..Default::default() to Foo { a: 1 }Foo { a: 1, ..Default::default() }
TransformOp
Generic transformation operation
UpdateCallArgOp
Update an argument at a specific index in function or method calls
UpdateDocCommentOp
Update existing documentation comment
UpdateEnumVariantOp
UpdateMatchArmOp
UpdateStructFieldOp

Enums§

ArgPosition
Insert position for call arguments (numeric since args are positional)
DocCommentStyle
Documentation comment style
EditMode
Edit mode for operations - controls how changes are applied to source files
FieldContext
Context in which a field appears
InsertPosition
Operation
TransformAction
Actions that can be performed on AST nodes