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§
Source§impl DBConnectOption
impl DBConnectOption
pub fn from_mysql(conn_opt: &MySqlConnectOptions) -> Result<Self>
pub fn from_pg(conn_opt: &PgConnectOptions) -> Result<Self>
pub fn from_sqlite(conn_opt: &SqliteConnectOptions) -> Result<Self>
pub fn from_mssql(conn_opt: &MssqlConnectOptions) -> Result<Self>
pub fn from(driver: &str) -> Result<Self>
Trait Implementations§
Source§impl Clone for DBConnectOption
impl Clone for DBConnectOption
Source§fn clone(&self) -> DBConnectOption
fn clone(&self) -> DBConnectOption
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 moreAuto Trait Implementations§
impl Freeze for DBConnectOption
impl !RefUnwindSafe for DBConnectOption
impl Send for DBConnectOption
impl Sync for DBConnectOption
impl Unpin for DBConnectOption
impl !UnwindSafe for DBConnectOption
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more