pub struct DBConfig {
pub host: String,
pub port: Option<u16>,
pub name: String,
pub user: Option<String>,
pub pwd: Option<String>,
pub sslmode: bool,
pub max: usize,
}
Expand description
Responsible for database configuration data.
§Values
engine: DBEngine
- Engine of database;host: String
- Host of database;port: Option<u16>
- Port of database;name: String
- Name of database;user: Option<String>
- Database user;pwd: Option<String>
- Password of database user;sslmode: bool
- Use for sslmode=require when connecting to the database;max: SysCount
- The number of connections that will be used in the pool;
Fields§
§host: String
Host of database.
port: Option<u16>
Port of database.
name: String
Name of database.
user: Option<String>
Database user.
pwd: Option<String>
Password of database user.
sslmode: bool
Use for sslmode=require when connecting to the database
max: usize
The number of connections that will be used in the pool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DBConfig
impl RefUnwindSafe for DBConfig
impl Send for DBConfig
impl Sync for DBConfig
impl Unpin for DBConfig
impl UnwindSafe for DBConfig
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