pub struct Connection {
pub mode: Mode,
pub hostname: String,
pub hostport: String,
pub database: String,
pub username: String,
pub userpass: String,
pub params: Vec<String>,
pub charset: Charset,
pub prefix: String,
pub debug: bool,
}
Expand description
数据库连接
Fields§
§mode: Mode
§hostname: String
连接地址
hostport: String
连接端口
database: String
数据库名称
username: String
账号
userpass: String
密码
params: Vec<String>
§charset: Charset
数据库语言
prefix: String
表前缀
debug: bool
调试开关
Implementations§
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Connection
impl Debug for Connection
Source§impl Default for Connection
impl Default for Connection
Source§impl<'de> Deserialize<'de> for Connection
impl<'de> Deserialize<'de> for Connection
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
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more