pub enum SqlxConnection {
Postgres(PoolConnection<Postgres>),
}Expand description
A database connection acquired from the pool.
Variants§
Postgres(PoolConnection<Postgres>)
PostgreSQL connection
Implementations§
Source§impl SqlxConnection
impl SqlxConnection
Sourcepub async fn acquire(pool: &SqlxPool) -> SqlxResult<Self>
pub async fn acquire(pool: &SqlxPool) -> SqlxResult<Self>
Acquire a connection from the pool.
Sourcepub fn backend(&self) -> DatabaseBackend
pub fn backend(&self) -> DatabaseBackend
Get the database backend type.
Auto Trait Implementations§
impl Freeze for SqlxConnection
impl !RefUnwindSafe for SqlxConnection
impl Send for SqlxConnection
impl Sync for SqlxConnection
impl Unpin for SqlxConnection
impl !UnwindSafe for SqlxConnection
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> 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>
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