Struct rbatis::db::DBConnectOption
source · [−]pub struct DBConnectOption {
pub driver_type: DriverType,
pub mysql: Option<MySqlConnectOptions>,
pub postgres: Option<PgConnectOptions>,
pub sqlite: Option<SqliteConnectOptions>,
pub mssql: Option<MssqlConnectOptions>,
}
Expand description
DBConnectOption all of support Database Options abstract struct. use from(url:&str) or use from_mysql(),from_pg()…. or other method init this.
Fields
driver_type: DriverType
mysql: Option<MySqlConnectOptions>
postgres: Option<PgConnectOptions>
sqlite: Option<SqliteConnectOptions>
mssql: Option<MssqlConnectOptions>
Implementations
sourceimpl DBConnectOption
impl DBConnectOption
pub fn from_mysql(
conn_opt: &MySqlConnectOptions
) -> Result<DBConnectOption, Error>
pub fn from_pg(conn_opt: &PgConnectOptions) -> Result<DBConnectOption, Error>
pub fn from_sqlite(
conn_opt: &SqliteConnectOptions
) -> Result<DBConnectOption, Error>
pub fn from_mssql(
conn_opt: &MssqlConnectOptions
) -> Result<DBConnectOption, Error>
pub fn from(driver: &str) -> Result<DBConnectOption, Error>
Trait Implementations
sourceimpl Clone for DBConnectOption
impl Clone for DBConnectOption
sourcefn clone(&self) -> DBConnectOption
fn clone(&self) -> DBConnectOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for DBConnectOption
impl Send for DBConnectOption
impl Sync for DBConnectOption
impl Unpin for DBConnectOption
impl !UnwindSafe for DBConnectOption
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more