Skip to main content

Postgres

Trait Postgres 

Source
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§

Provided Methods§

Source

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".

Implementors§