pub async fn connect_with_pool(pool: &Pool<DB>) -> Result<Self, sqlx::Error> {
        let conn = pool.acquire().await?;

        Ok(Self {
            options: MigratorOptions::default(),
            conn: conn.detach(),
            table: Cow::Borrowed(DEFAULT_MIGRATIONS_TABLE),
            migrations: Vec::default(),
        })
    }
/// Use a connection from an existing connection pool.
///
/// **note**: A connection will be detached from the pool.
///
/// # Errors
///
/// An error is returned on connection failure.
Use a connection from an existing connection pool.
note**: A connection will be detached from the pool.
Use a connection from an existing connection pool . note ** : A connection will be detached from the pool .
pub async fn connect_with_pool(pool: &Pool<DB>) -> Result<Self, sqlx::Error> {
        let conn = pool.acquire().await?;
        Ok(Self {
            options: MigratorOptions::default(),
            conn: conn.detach(),
            table: Cow::Borrowed(DEFAULT_MIGRATIONS_TABLE),
            migrations: Vec::default(),
        })
    }
pub async fn connect_with_pool ( pool : & Pool < DB > ) -> Result < Self , sqlx :: Error > { let conn = pool . acquire ( ) . await ? ; Ok ( Self { options : MigratorOptions :: default ( ) , conn : conn . detach ( ) , table : Cow :: Borrowed ( DEFAULT_MIGRATIONS_TABLE ) , migrations : Vec :: default ( ) , } ) }
Use a connection from an existing connection pool.
Use a connection from an existing connection pool .
pool
&Pool<DB>
pool
&Pool<DB>
errors
An error is returned on connection failure.
An error is returned on connection failure .