Struct sqlx_core::any::AnyConnectOptions
source · pub struct AnyConnectOptions(_);
Expand description
Opaque options for connecting to a database. These may only be constructed by parsing from a connection url.
postgres://postgres:password@localhost/database
mysql://root:password@localhost/database
Implementations§
source§impl AnyConnectOptions
impl AnyConnectOptions
pub fn as_postgres(&self) -> Option<&PgConnectOptions>
pub fn as_postgres_mut(&mut self) -> Option<&mut PgConnectOptions>
source§impl AnyConnectOptions
impl AnyConnectOptions
pub fn as_mysql(&self) -> Option<&MySqlConnectOptions>
pub fn as_mysql_mut(&mut self) -> Option<&mut MySqlConnectOptions>
source§impl AnyConnectOptions
impl AnyConnectOptions
pub fn as_sqlite(&self) -> Option<&SqliteConnectOptions>
pub fn as_sqlite_mut(&mut self) -> Option<&mut SqliteConnectOptions>
source§impl AnyConnectOptions
impl AnyConnectOptions
pub fn as_mssql(&self) -> Option<&MssqlConnectOptions>
pub fn as_mssql_mut(&mut self) -> Option<&mut MssqlConnectOptions>
Trait Implementations§
source§impl Clone for AnyConnectOptions
impl Clone for AnyConnectOptions
source§fn clone(&self) -> AnyConnectOptions
fn clone(&self) -> AnyConnectOptions
Returns a copy 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 ConnectOptions for AnyConnectOptions
impl ConnectOptions for AnyConnectOptions
type Connection = AnyConnection
source§fn connect(&self) -> BoxFuture<'_, Result<AnyConnection, Error>>
fn connect(&self) -> BoxFuture<'_, Result<AnyConnection, Error>>
Establish a new database connection with the options specified by
self
.source§fn log_statements(&mut self, level: LevelFilter) -> &mut Self
fn log_statements(&mut self, level: LevelFilter) -> &mut Self
Log executed statements with the specified
level
source§fn log_slow_statements(
&mut self,
level: LevelFilter,
duration: Duration
) -> &mut Self
fn log_slow_statements( &mut self, level: LevelFilter, duration: Duration ) -> &mut Self
Log executed statements with a duration above the specified
duration
at the specified level
.source§fn disable_statement_logging(&mut self) -> &mut Self
fn disable_statement_logging(&mut self) -> &mut Self
Entirely disables statement logging (both slow and regular).
source§impl Debug for AnyConnectOptions
impl Debug for AnyConnectOptions
source§impl From<MssqlConnectOptions> for AnyConnectOptions
impl From<MssqlConnectOptions> for AnyConnectOptions
source§fn from(options: MssqlConnectOptions) -> Self
fn from(options: MssqlConnectOptions) -> Self
Converts to this type from the input type.
source§impl From<MySqlConnectOptions> for AnyConnectOptions
impl From<MySqlConnectOptions> for AnyConnectOptions
source§fn from(options: MySqlConnectOptions) -> Self
fn from(options: MySqlConnectOptions) -> Self
Converts to this type from the input type.
source§impl From<PgConnectOptions> for AnyConnectOptions
impl From<PgConnectOptions> for AnyConnectOptions
source§fn from(options: PgConnectOptions) -> Self
fn from(options: PgConnectOptions) -> Self
Converts to this type from the input type.
source§impl From<SqliteConnectOptions> for AnyConnectOptions
impl From<SqliteConnectOptions> for AnyConnectOptions
source§fn from(options: SqliteConnectOptions) -> Self
fn from(options: SqliteConnectOptions) -> Self
Converts to this type from the input type.