pub async fn build(&self) -> anyhow::Result<ConnectionPool<DB>> {
        let options = PgPoolOptions::new()
            .max_connections(self.max_size)
            .acquire_timeout(self.acquire_timeout);
        let mut connect_options: PgConnectOptions = self
            .database_url
            .expose_str()
            .parse()
            .context("Failed parsing database URL")?;
        if let Some(timeout) = self.statement_timeout {
            let timeout_string = format!("{}s", timeout.as_secs());
            connect_options = connect_options.options([("statement_timeout", timeout_string)]);
        }
        let pool = options
            .connect_with(connect_options)
            .await
            .context("Failed connecting to database")?;
        tracing::info!("Created DB pool with parameters {self:?}");
        Ok(ConnectionPool {
            database_url: self.database_url.clone(),
            inner: pool,
            max_size: self.max_size,
            acquire_retries: self.acquire_retries,
            traced_connections: None,
            _db: PhantomData,
        })
    }
Builds a connection pool from this builder.
core/lib/db_connection/src/connection_pool.rs