pub trait Migrator: Send + Sync {
// Required methods
fn migrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rollback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn applied_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Migration>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pending_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Migration>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Migration operations
Required Methods§
Sourcefn migrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn migrate<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Apply pending migrations
Sourcefn rollback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rollback<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Rollback last migration
Sourcefn applied_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Migration>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn applied_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Migration>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get applied migrations
Sourcefn pending_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Migration>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_migrations<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Migration>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get pending migrations
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".