pub enum PatchOp {
ReplaceNode {
target: NodeId,
replacement: Node,
},
AddFunction {
func: FuncDef,
},
RemoveFunction {
func_id: FuncId,
},
AddImport {
import: Import,
},
RemoveImport {
import: Import,
},
RenameSymbol {
old_name: String,
new_name: String,
scope: Option<FuncId>,
},
AddEffect {
func_id: FuncId,
effect: Effect,
},
RemoveEffect {
func_id: FuncId,
effect: Effect,
},
}Expand description
A single patch operation.
Variants§
ReplaceNode
Replace a node (identified by NodeId) with a new node. The replacement’s root may have a different NodeId.
AddFunction
Add a new function to the module.
RemoveFunction
Remove a function by its FuncId.
AddImport
Add an import to the module.
RemoveImport
Remove an import from the module.
RenameSymbol
Rename a symbol (variable, function name, call target) throughout the module or within a specific function scope.
Fields
AddEffect
Add an effect to a function’s declared effect list.
RemoveEffect
Remove an effect from a function’s declared effect list.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PatchOp
impl<'de> Deserialize<'de> for PatchOp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PatchOp
impl RefUnwindSafe for PatchOp
impl Send for PatchOp
impl Sync for PatchOp
impl Unpin for PatchOp
impl UnsafeUnpin for PatchOp
impl UnwindSafe for PatchOp
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