Struct AnyConnectOptions  
#[non_exhaustive]pub struct AnyConnectOptions {
    pub database_url: Url,
    pub log_settings: LogSettings,
}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/databaseFields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.database_url: Url§log_settings: LogSettingsTrait Implementations§
§impl Clone for AnyConnectOptions
 
impl Clone for AnyConnectOptions
§fn clone(&self) -> AnyConnectOptions
 
fn clone(&self) -> AnyConnectOptions
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 more§impl ConnectOptions for AnyConnectOptions
 
impl ConnectOptions for AnyConnectOptions
type Connection = AnyConnection
§fn to_url_lossy(&self) -> Url
 
fn to_url_lossy(&self) -> Url
Get a connection URL that may be used to connect to the same database as this 
ConnectOptions. Read more§fn connect(
    &self,
) -> Pin<Box<dyn Future<Output = Result<AnyConnection, Error>> + Send + '_>>
 
fn connect( &self, ) -> Pin<Box<dyn Future<Output = Result<AnyConnection, Error>> + Send + '_>>
Establish a new database connection with the options specified by 
self.§fn log_statements(self, level: LevelFilter) -> AnyConnectOptions
 
fn log_statements(self, level: LevelFilter) -> AnyConnectOptions
Log executed statements with the specified 
level§fn log_slow_statements(
    self,
    level: LevelFilter,
    duration: Duration,
) -> AnyConnectOptions
 
fn log_slow_statements( self, level: LevelFilter, duration: Duration, ) -> AnyConnectOptions
Log executed statements with a duration above the specified 
duration
at the specified level.§fn disable_statement_logging(self) -> Self
 
fn disable_statement_logging(self) -> Self
Entirely disables statement logging (both slow and regular).
§impl Debug for AnyConnectOptions
 
impl Debug for AnyConnectOptions
§impl FromStr for AnyConnectOptions
 
impl FromStr for AnyConnectOptions
§impl<'a> TryFrom<&'a AnyConnectOptions> for MySqlConnectOptions
 
impl<'a> TryFrom<&'a AnyConnectOptions> for MySqlConnectOptions
§fn try_from(
    any_opts: &'a AnyConnectOptions,
) -> Result<MySqlConnectOptions, <MySqlConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
 
fn try_from( any_opts: &'a AnyConnectOptions, ) -> Result<MySqlConnectOptions, <MySqlConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
Performs the conversion.
§impl<'a> TryFrom<&'a AnyConnectOptions> for PgConnectOptions
 
impl<'a> TryFrom<&'a AnyConnectOptions> for PgConnectOptions
§fn try_from(
    value: &'a AnyConnectOptions,
) -> Result<PgConnectOptions, <PgConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
 
fn try_from( value: &'a AnyConnectOptions, ) -> Result<PgConnectOptions, <PgConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
Performs the conversion.
§impl<'a> TryFrom<&'a AnyConnectOptions> for SqliteConnectOptions
 
impl<'a> TryFrom<&'a AnyConnectOptions> for SqliteConnectOptions
§fn try_from(
    opts: &'a AnyConnectOptions,
) -> Result<SqliteConnectOptions, <SqliteConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
 
fn try_from( opts: &'a AnyConnectOptions, ) -> Result<SqliteConnectOptions, <SqliteConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for AnyConnectOptions
impl RefUnwindSafe for AnyConnectOptions
impl Send for AnyConnectOptions
impl Sync for AnyConnectOptions
impl Unpin for AnyConnectOptions
impl UnwindSafe for AnyConnectOptions
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,
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§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> ⓘ
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