pub trait Migrate {
// Required methods
fn ensure_migrations_table(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>;
fn dirty_version(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<i64>, MigrateError>> + Send + '_>>;
fn list_applied_migrations(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration>, MigrateError>> + Send + '_>>;
fn lock(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>;
fn unlock(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>;
fn apply<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm>>
where 'e: 'm;
fn revert<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm>>
where 'e: 'm;
}Required Methods§
fn ensure_migrations_table( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>
fn dirty_version( &mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<i64>, MigrateError>> + Send + '_>>
fn list_applied_migrations( &mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration>, MigrateError>> + Send + '_>>
fn lock( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>
fn unlock( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send + '_>>
fn apply<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm>>where
'e: 'm,
fn revert<'e, 'm>(
&'e mut self,
migration: &'m Migration,
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + Send + 'm>>where
'e: 'm,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".