pub trait DbContextOptionsBuilderExt {
// Required methods
fn use_postgres(&mut self, connection_string: &str) -> &mut Self;
fn use_postgres_with_pool(
&mut self,
connection_string: &str,
pool_size: usize,
) -> &mut Self;
fn use_postgres_with_tls(
&mut self,
connection_string: &str,
pool_size: usize,
tls: PgTlsMode,
) -> &mut Self;
}Required Methods§
Sourcefn use_postgres(&mut self, connection_string: &str) -> &mut Self
fn use_postgres(&mut self, connection_string: &str) -> &mut Self
Registers a PostgreSQL provider with a default pool size of 5.
Sourcefn use_postgres_with_pool(
&mut self,
connection_string: &str,
pool_size: usize,
) -> &mut Self
fn use_postgres_with_pool( &mut self, connection_string: &str, pool_size: usize, ) -> &mut Self
Registers a PostgreSQL provider with a configurable pool size.
pool_size = 0 uses the deadpool default (CPU count).
Sourcefn use_postgres_with_tls(
&mut self,
connection_string: &str,
pool_size: usize,
tls: PgTlsMode,
) -> &mut Self
fn use_postgres_with_tls( &mut self, connection_string: &str, pool_size: usize, tls: PgTlsMode, ) -> &mut Self
Registers a PostgreSQL provider with configurable TLS.
PgTlsMode::Disable is equivalent to DbContextOptionsBuilderExt::use_postgres_with_pool.
PgTlsMode::Require(connector) enforces TLS for all pooled connections
using the platform’s native TLS implementation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".