Trait Migrations

Source
pub trait Migrations: Connection {
    // Required methods
    fn ensure_migrations_table<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn lock<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unlock<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_migrations<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn add_migration<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
        migration: AppliedMigration<'static>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_migration<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
        version: u64,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn clear_migrations<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        table_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn ensure_migrations_table<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn unlock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn add_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, migration: AppliedMigration<'static>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn remove_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn clear_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementations on Foreign Types§

Source§

impl Migrations for PgConnection

Source§

fn ensure_migrations_table<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn unlock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn add_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, migration: AppliedMigration<'static>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn remove_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn clear_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl Migrations for SqliteConnection

Source§

fn ensure_migrations_table<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn unlock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AppliedMigration<'static>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn add_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, migration: AppliedMigration<'static>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn remove_migration<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, version: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn clear_migrations<'life0, 'life1, 'async_trait>( &'life0 mut self, table_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§