pub enum Exec<'a> {
SqlitePool(&'a Pool<Sqlite>),
SqliteConn(&'a mut SqliteConnection),
PgPool(&'a Pool<Postgres>),
PgConn(&'a mut PgConnection),
}Expand description
Where a statement is about to run.
Built through Into, so a call site passes a &Database, a transaction’s
connection or a bare pool and the enum is an implementation detail.
Variants§
SqlitePool(&'a Pool<Sqlite>)
SqliteConn(&'a mut SqliteConnection)
PgPool(&'a Pool<Postgres>)
PgConn(&'a mut PgConnection)
Implementations§
Trait Implementations§
Source§impl<'a> From<&'a Arc<Database>> for Exec<'a>
Most callers outside this crate hold the database behind an Arc, so a
statement takes one without being handed &*db at every site.
impl<'a> From<&'a Arc<Database>> for Exec<'a>
Most callers outside this crate hold the database behind an Arc, so a
statement takes one without being handed &*db at every site.
Source§impl<'a> From<&'a mut PgConnection> for Exec<'a>
impl<'a> From<&'a mut PgConnection> for Exec<'a>
Source§fn from(conn: &'a mut PgConnection) -> Self
fn from(conn: &'a mut PgConnection) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a mut SqliteConnection> for Exec<'a>
impl<'a> From<&'a mut SqliteConnection> for Exec<'a>
Source§fn from(conn: &'a mut SqliteConnection) -> Self
fn from(conn: &'a mut SqliteConnection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Exec<'a>
impl<'a> !UnwindSafe for Exec<'a>
impl<'a> Freeze for Exec<'a>
impl<'a> Send for Exec<'a>
impl<'a> Sync for Exec<'a>
impl<'a> Unpin for Exec<'a>
impl<'a> UnsafeUnpin for Exec<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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