pub struct SyncTransactionManagerWrapper<T>(/* private fields */);
Available on crate feature
sync-connection-wrapper
only.Expand description
A wrapper of a diesel transaction manager usable in async context.
Trait Implementations§
Source§impl<T, C> TransactionManager<SyncConnectionWrapper<C>> for SyncTransactionManagerWrapper<T>where
SyncConnectionWrapper<C>: AsyncConnection,
C: Connection + 'static,
T: TransactionManager<C> + Send,
impl<T, C> TransactionManager<SyncConnectionWrapper<C>> for SyncTransactionManagerWrapper<T>where
SyncConnectionWrapper<C>: AsyncConnection,
C: Connection + 'static,
T: TransactionManager<C> + Send,
Source§type TransactionStateData = <T as TransactionManager<C>>::TransactionStateData
type TransactionStateData = <T as TransactionManager<C>>::TransactionStateData
Data stored as part of the connection implementation
to track the current transaction state of a connection
Source§fn begin_transaction<'life0, 'async_trait>(
conn: &'life0 mut SyncConnectionWrapper<C>,
) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn begin_transaction<'life0, 'async_trait>(
conn: &'life0 mut SyncConnectionWrapper<C>,
) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Begin a new transaction or savepoint Read more
Source§fn commit_transaction<'life0, 'async_trait>(
conn: &'life0 mut SyncConnectionWrapper<C>,
) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn commit_transaction<'life0, 'async_trait>(
conn: &'life0 mut SyncConnectionWrapper<C>,
) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Commit the inner-most transaction or savepoint Read more
Source§fn rollback_transaction<'life0, 'async_trait>(
conn: &'life0 mut SyncConnectionWrapper<C>,
) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn rollback_transaction<'life0, 'async_trait>(
conn: &'life0 mut SyncConnectionWrapper<C>,
) -> Pin<Box<dyn Future<Output = QueryResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Rollback the inner-most transaction or savepoint Read more
Source§fn transaction<'a, 'life0, 'async_trait, F, R, E>(
conn: &'life0 mut Conn,
callback: F,
) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'async_trait>>where
F: for<'r> FnOnce(&'r mut Conn) -> ScopedBoxFuture<'a, 'r, Result<R, E>> + Send + 'a + 'async_trait,
E: From<Error> + Send + 'async_trait,
R: Send + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn transaction<'a, 'life0, 'async_trait, F, R, E>(
conn: &'life0 mut Conn,
callback: F,
) -> Pin<Box<dyn Future<Output = Result<R, E>> + Send + 'async_trait>>where
F: for<'r> FnOnce(&'r mut Conn) -> ScopedBoxFuture<'a, 'r, Result<R, E>> + Send + 'a + 'async_trait,
E: From<Error> + Send + 'async_trait,
R: Send + 'async_trait,
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Executes the given function inside of a database transaction Read more
Auto Trait Implementations§
impl<T> Freeze for SyncTransactionManagerWrapper<T>
impl<T> RefUnwindSafe for SyncTransactionManagerWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for SyncTransactionManagerWrapper<T>where
T: Send,
impl<T> Sync for SyncTransactionManagerWrapper<T>where
T: Sync,
impl<T> Unpin for SyncTransactionManagerWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for SyncTransactionManagerWrapper<T>where
T: UnwindSafe,
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> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
Source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> Conn::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> Conn::ExecuteFuture<'conn, 'query>
Executes the given command, returning the number of rows affected. Read more
Source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> LoadFuture<'conn, 'query, Self, Conn, U>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> LoadFuture<'conn, 'query, Self, Conn, U>
Source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
Source§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> GetResult<'conn, 'query, Self, Conn, U>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> GetResult<'conn, 'query, Self, Conn, U>
Runs the command, and returns the affected row. Read more
Source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> LoadFuture<'conn, 'query, Self, Conn, U>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> LoadFuture<'conn, 'query, Self, Conn, U>
Runs the command, returning an
Vec
with the affected rows. Read more