pub struct PostgreSqlConfig {
pub host: String,
pub port: u16,
pub database: String,
pub username: String,
pub password: String,
pub max_pool_size: u32,
pub connect_timeout: u64,
}Fields§
§host: String主机地址
port: u16端口
database: String数据库名
username: String用户名
password: String密码
max_pool_size: u32最大连接池大小
connect_timeout: u64连接超时时间(秒)
Trait Implementations§
Source§impl Clone for PostgreSqlConfig
impl Clone for PostgreSqlConfig
Source§fn clone(&self) -> PostgreSqlConfig
fn clone(&self) -> PostgreSqlConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgreSqlConfig
impl Debug for PostgreSqlConfig
Source§impl Default for PostgreSqlConfig
impl Default for PostgreSqlConfig
Source§impl<'de> Deserialize<'de> for PostgreSqlConfig
impl<'de> Deserialize<'de> for PostgreSqlConfig
Source§fn 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
Source§impl Serialize for PostgreSqlConfig
impl Serialize for PostgreSqlConfig
Source§impl ToConnectionUrl for PostgreSqlConfig
impl ToConnectionUrl for PostgreSqlConfig
fn to_connection_url(&self) -> String
Auto Trait Implementations§
impl Freeze for PostgreSqlConfig
impl RefUnwindSafe for PostgreSqlConfig
impl Send for PostgreSqlConfig
impl Sync for PostgreSqlConfig
impl Unpin for PostgreSqlConfig
impl UnwindSafe for PostgreSqlConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)