pub struct FileEditOp {
pub path: PathBuf,
pub old_content: String,
pub new_content: String,
}Expand description
File edit operation with compensation
Fields§
§path: PathBufPath to the file being edited.
old_content: StringOriginal file content before edit.
new_content: StringNew file content after edit.
Trait Implementations§
Source§impl CompensableOperation for FileEditOp
impl CompensableOperation for FileEditOp
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<OperationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<OperationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the forward operation
Source§fn compensate<'life0, 'life1, 'async_trait>(
&'life0 self,
result: &'life1 OperationResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn compensate<'life0, 'life1, 'async_trait>(
&'life0 self,
result: &'life1 OperationResult,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Compensate (undo) the operation
Source§fn description(&self) -> String
fn description(&self) -> String
Get operation description for logging
Source§fn operation_type(&self) -> SagaOperationType
fn operation_type(&self) -> SagaOperationType
Get the operation type (for categorization)
Auto Trait Implementations§
impl Freeze for FileEditOp
impl RefUnwindSafe for FileEditOp
impl Send for FileEditOp
impl Sync for FileEditOp
impl Unpin for FileEditOp
impl UnsafeUnpin for FileEditOp
impl UnwindSafe for FileEditOp
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