Struct postgres_shared::params::ConnectParams [−][src]
pub struct ConnectParams { /* fields omitted */ }
Information necessary to open a new connection to a Postgres server.
Methods
impl ConnectParams
[src]
impl ConnectParams
pub fn builder() -> Builder
[src]
pub fn builder() -> Builder
Returns a new builder.
pub fn host(&self) -> &Host
[src]
pub fn host(&self) -> &Host
The target host.
pub fn port(&self) -> u16
[src]
pub fn port(&self) -> u16
The target port.
Defaults to 5432.
pub fn user(&self) -> Option<&User>
[src]
pub fn user(&self) -> Option<&User>
The user to log in as.
A user is required to open a new connection but not to cancel a query.
pub fn database(&self) -> Option<&str>
[src]
pub fn database(&self) -> Option<&str>
The database to connect to.
pub fn options(&self) -> &[(String, String)]
[src]
pub fn options(&self) -> &[(String, String)]
Runtime parameters to be passed to the Postgres backend.
pub fn connect_timeout(&self) -> Option<Duration>
[src]
pub fn connect_timeout(&self) -> Option<Duration>
A timeout to apply to each socket-level connection attempt.
Trait Implementations
impl Clone for ConnectParams
[src]
impl Clone for ConnectParams
fn clone(&self) -> ConnectParams
[src]
fn clone(&self) -> ConnectParams
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for ConnectParams
[src]
impl Debug for ConnectParams
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for ConnectParams
[src]
impl PartialEq for ConnectParams
fn eq(&self, other: &ConnectParams) -> bool
[src]
fn eq(&self, other: &ConnectParams) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ConnectParams) -> bool
[src]
fn ne(&self, other: &ConnectParams) -> bool
This method tests for !=
.
impl Eq for ConnectParams
[src]
impl Eq for ConnectParams
impl Hash for ConnectParams
[src]
impl Hash for ConnectParams
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl IntoConnectParams for ConnectParams
[src]
impl IntoConnectParams for ConnectParams
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>>
[src]
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>>
Converts the value of self
into a ConnectParams
.
Auto Trait Implementations
impl Send for ConnectParams
impl Send for ConnectParams
impl Sync for ConnectParams
impl Sync for ConnectParams