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,
pub zone: Option<String>,
}
Expand description
Responsible for database configuration data.
Values
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;zone: String
- Time zone to init database.
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
zone: Option<String>
Time zone to init database.
Trait Implementations§
Auto Trait Implementations§
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