Skip to main content

EditOperation

Trait EditOperation 

Source
pub trait EditOperation: Send + Sync {
    // Required methods
    fn verify<'life0, 'life1, 'async_trait>(
        &'life0 self,
        module: &'life1 AnalysisModule,
    ) -> Pin<Box<dyn Future<Output = Result<ApplyResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn preview<'life0, 'life1, 'async_trait>(
        &'life0 self,
        module: &'life1 AnalysisModule,
    ) -> Pin<Box<dyn Future<Output = Result<Diff>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn apply<'life0, 'life1, 'async_trait>(
        &'life0 self,
        module: &'life1 mut AnalysisModule,
    ) -> Pin<Box<dyn Future<Output = Result<ApplyResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Edit operation trait for code transformations.

Required Methods§

Source

fn verify<'life0, 'life1, 'async_trait>( &'life0 self, module: &'life1 AnalysisModule, ) -> Pin<Box<dyn Future<Output = Result<ApplyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Verify the operation can be applied.

Source

fn preview<'life0, 'life1, 'async_trait>( &'life0 self, module: &'life1 AnalysisModule, ) -> Pin<Box<dyn Future<Output = Result<Diff>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Preview the changes without applying.

Source

fn apply<'life0, 'life1, 'async_trait>( &'life0 self, module: &'life1 mut AnalysisModule, ) -> Pin<Box<dyn Future<Output = Result<ApplyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply the operation.

Implementors§