pub struct MySqlConfig {
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 MySqlConfig
impl Clone for MySqlConfig
Source§fn clone(&self) -> MySqlConfig
fn clone(&self) -> MySqlConfig
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 MySqlConfig
impl Debug for MySqlConfig
Source§impl Default for MySqlConfig
impl Default for MySqlConfig
Source§impl<'de> Deserialize<'de> for MySqlConfig
impl<'de> Deserialize<'de> for MySqlConfig
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 MySqlConfig
impl Serialize for MySqlConfig
Source§impl ToConnectionUrl for MySqlConfig
impl ToConnectionUrl for MySqlConfig
fn to_connection_url(&self) -> String
Auto Trait Implementations§
impl Freeze for MySqlConfig
impl RefUnwindSafe for MySqlConfig
impl Send for MySqlConfig
impl Sync for MySqlConfig
impl Unpin for MySqlConfig
impl UnwindSafe for MySqlConfig
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)