Struct tokio_postgres::params::ConnectParams
[−]
pub struct ConnectParams { pub target: ConnectTarget, pub port: Option<u16>, pub user: Option<UserInfo>, pub database: Option<String>, pub options: Vec<(String, String)>, }
Information necessary to open a new connection to a Postgres server.
Fields
target: ConnectTarget
The target server.
port: Option<u16>
The target port.
Defaults to 5432 if not specified.
user: Option<UserInfo>
The user to login as.
Connection::connect
requires a user but cancel_query
does not.
database: Option<String>
The database to connect to.
Defaults the value of user
.
options: Vec<(String, String)>
Runtime parameters to be passed to the Postgres backend.
Trait Implementations
impl Debug for ConnectParams
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl Clone for ConnectParams
fn clone(&self) -> ConnectParams
impl IntoConnectParams for ConnectParams
fn into_connect_params(self)
-> Result<ConnectParams, Box<Error + 'static + Send + Sync>>
-> Result<ConnectParams, Box<Error + 'static + Send + Sync>>
Converts the value of self
into a ConnectParams
.