[−][src]Trait sqlx::Connect
Represents a type that can directly establish a new connection.
Associated Types
type Connection: Connection
Required methods
fn connect<T>(
url: T
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
url: T
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
Establish a new database connection.
Implementors
impl Connect for MySqlConnection
[src]
type Connection = MySqlConnection
fn connect<T>(
url: T
) -> Pin<Box<dyn Future<Output = Result<MySqlConnection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
MySqlConnection: Sized,
[src]
url: T
) -> Pin<Box<dyn Future<Output = Result<MySqlConnection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
MySqlConnection: Sized,
impl Connect for PgConnection
[src]
type Connection = PgConnection
fn connect<T>(
url: T
) -> Pin<Box<dyn Future<Output = Result<PgConnection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
PgConnection: Sized,
[src]
url: T
) -> Pin<Box<dyn Future<Output = Result<PgConnection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
PgConnection: Sized,