Skip to main content

SpgPoolExt

Trait SpgPoolExt 

Source
pub trait SpgPoolExt: Sized {
    // Required methods
    fn connect_in_memory() -> BoxFuture<'static, Result<SpgPool, Error>>;
    fn connect_path(path: PathBuf) -> BoxFuture<'static, Result<SpgPool, Error>>;
}
Expand description

Convenience constructors that mirror sqlx’s pool-construction shape (PgPool::connect(url) style). Implemented as an extension trait on SpgPool so consumers can write SpgPool::connect_in_memory().await directly.

Required Methods§

Source

fn connect_in_memory() -> BoxFuture<'static, Result<SpgPool, Error>>

In-memory pool — single connection, no persistence.

Source

fn connect_path(path: PathBuf) -> BoxFuture<'static, Result<SpgPool, Error>>

File-backed pool at path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§