pub struct MySqlProvider { /* private fields */ }Implementations§
Source§impl MySqlProvider
impl MySqlProvider
Sourcepub async fn new(connection_string: &str) -> EFResult<Self>
pub async fn new(connection_string: &str) -> EFResult<Self>
Creates a provider with TLS required (secure-by-default, v1.6+).
Overrides any ssl-mode in the connection string. For plaintext
connections (local dev only), use MySqlProvider::new_insecure.
Sourcepub async fn new_insecure(connection_string: &str) -> EFResult<Self>
pub async fn new_insecure(connection_string: &str) -> EFResult<Self>
Creates a provider with TLS disabled (plaintext, local dev only).
pub fn from_pool(pool: MySqlPool) -> Self
Sourcepub fn new_lazy(connection_string: &str) -> EFResult<Self>
pub fn new_lazy(connection_string: &str) -> EFResult<Self>
Creates a lazy provider with TLS required (secure-by-default, v1.6+).
Sourcepub fn new_lazy_insecure(connection_string: &str) -> EFResult<Self>
pub fn new_lazy_insecure(connection_string: &str) -> EFResult<Self>
Creates a lazy provider with TLS disabled (plaintext, local dev only).
Sourcepub async fn new_with_tls(
connection_string: &str,
tls: MySqlTlsMode,
) -> EFResult<Self>
pub async fn new_with_tls( connection_string: &str, tls: MySqlTlsMode, ) -> EFResult<Self>
Creates a provider with explicit TLS configuration.
The TLS mode overrides any ssl-mode in the connection string.
For CA certificate verification (VerifyCa / VerifyIdentity),
provide the CA certificate via the connection string’s ssl-ca
parameter.
For the secure-by-default convenience constructor, use
MySqlProvider::new. For plaintext (local dev), use
MySqlProvider::new_insecure.
Sourcepub fn new_lazy_with_tls(
connection_string: &str,
tls: MySqlTlsMode,
) -> EFResult<Self>
pub fn new_lazy_with_tls( connection_string: &str, tls: MySqlTlsMode, ) -> EFResult<Self>
Creates a lazy provider (no immediate connection) with explicit TLS.
See MySqlProvider::new_with_tls for TLS mode details.
Trait Implementations§
Source§impl Debug for MySqlProvider
impl Debug for MySqlProvider
Source§impl IDatabaseProvider for MySqlProvider
impl IDatabaseProvider for MySqlProvider
Source§fn sql_generator(&self) -> &'static dyn ISqlGenerator
fn sql_generator(&self) -> &'static dyn ISqlGenerator
Source§fn get_connection<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EFResult<Box<dyn IAsyncConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_connection<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = EFResult<Box<dyn IAsyncConnection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn execute_migration_command<'life0, 'life1, 'async_trait>(
&'life0 self,
sql: &'life1 str,
) -> Pin<Box<dyn Future<Output = EFResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_migration_command<'life0, 'life1, 'async_trait>(
&'life0 self,
sql: &'life1 str,
) -> Pin<Box<dyn Future<Output = EFResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn migration_dialect(&self) -> MigrationDialect
fn migration_dialect(&self) -> MigrationDialect
Auto Trait Implementations§
impl !RefUnwindSafe for MySqlProvider
impl !UnwindSafe for MySqlProvider
impl Freeze for MySqlProvider
impl Send for MySqlProvider
impl Sync for MySqlProvider
impl Unpin for MySqlProvider
impl UnsafeUnpin for MySqlProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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