Trait MigrateDatabase

pub trait MigrateDatabase {
    // Required methods
    fn create_database(
        url: &str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
    fn database_exists(
        url: &str,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + '_>>;
    fn drop_database(
        url: &str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;

    // Provided method
    fn force_drop_database(
        _url: &str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>> { ... }
}

Required Methods§

fn create_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

fn database_exists( url: &str, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + '_>>

fn drop_database( url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

Provided Methods§

fn force_drop_database( _url: &str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§