pub trait Postgres: Binding {
// Required method
fn connection_params(&self) -> PostgresConnectionParams;
// Provided method
fn connection_string(&self) -> String { ... }
}Expand description
Connection-only Postgres binding. Unlike every other resource, Postgres ships no gRPC service and wraps no operations (by design): every backend speaks the same wire protocol, so the binding returns connection details and the application uses its own driver.
Required Methods§
fn connection_params(&self) -> PostgresConnectionParams
Provided Methods§
Sourcefn connection_string(&self) -> String
fn connection_string(&self) -> String
postgres:// connection string, derived from connection_params and never stored.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".