Struct pleingres::ConfigFile
source · pub struct ConfigFile {
pub user: String,
pub password: String,
pub db: String,
pub addr: String,
pub tcp_keepalive: Option<u32>,
pub idle_timeout: Option<u64>,
pub ssl: Option<SSLConfigFile>,
}
Expand description
A serializable version of Parameters
, for inclusion in
configuration files.
Fields
user: String
PostgreSQL user.
password: String
Password.
db: String
Database name.
addr: String
Network address of the server.
tcp_keepalive: Option<u32>
TCP keepalive interval, defaults to no keep alive (in milliseconds).
idle_timeout: Option<u64>
Time to wait before reconnecting an idle connection (in milliseconds).
ssl: Option<SSLConfigFile>
SSL parameters
Implementations
sourceimpl ConfigFile
impl ConfigFile
sourcepub fn to_parameters(&self) -> Result<Parameters, Error>
pub fn to_parameters(&self) -> Result<Parameters, Error>
Convert a configuration file to parameters.
Trait Implementations
sourceimpl Default for ConfigFile
impl Default for ConfigFile
sourcefn default() -> ConfigFile
fn default() -> ConfigFile
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ConfigFile
impl<'de> Deserialize<'de> for ConfigFile
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for ConfigFile
impl Serialize for ConfigFile
Auto Trait Implementations
impl RefUnwindSafe for ConfigFile
impl Send for ConfigFile
impl Sync for ConfigFile
impl Unpin for ConfigFile
impl UnwindSafe for ConfigFile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more