pub trait Executor: Send + Sync {
// Required methods
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
plan: &'life2 MigrationPlan,
runner: &'life3 dyn MigrationRunner,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn dry_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
plan: &'life2 MigrationPlan,
runner: &'life3 dyn MigrationRunner,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Trait for executing migration plans
The executor coordinates between the planner, migration runner, and other components to safely execute migrations.
Required Methods§
Sourcefn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
plan: &'life2 MigrationPlan,
runner: &'life3 dyn MigrationRunner,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
plan: &'life2 MigrationPlan,
runner: &'life3 dyn MigrationRunner,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn dry_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
plan: &'life2 MigrationPlan,
runner: &'life3 dyn MigrationRunner,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn dry_run<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
plan: &'life2 MigrationPlan,
runner: &'life3 dyn MigrationRunner,
) -> Pin<Box<dyn Future<Output = Result<ExecutionResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute a migration plan in dry-run mode
This validates the plan and returns what would happen, but doesn’t actually execute any changes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".