pub enum TransactionManagerStatus {
Valid(ValidTransactionManagerStatus),
InError,
}
Expand description
Status of the transaction manager
Variants§
Valid(ValidTransactionManagerStatus)
Valid status, the manager can run operations
InError
Error status, probably following a broken connection. The manager will no longer run operations
Implementations§
source§impl TransactionManagerStatus
impl TransactionManagerStatus
sourcepub fn transaction_depth(&self) -> QueryResult<Option<NonZeroU32>>
pub fn transaction_depth(&self) -> QueryResult<Option<NonZeroU32>>
Returns the transaction depth if the transaction manager’s status is valid, or returns
Error::BrokenTransactionManager
if the transaction manager is in error.
sourcepub fn set_in_error(&mut self)
pub fn set_in_error(&mut self)
Sets the transaction manager status to InError
Subsequent attempts to use transaction-related features will result in a
Error::BrokenTransactionManager
error
Trait Implementations§
source§impl Debug for TransactionManagerStatus
impl Debug for TransactionManagerStatus
Auto Trait Implementations§
impl Freeze for TransactionManagerStatus
impl RefUnwindSafe for TransactionManagerStatus
impl Send for TransactionManagerStatus
impl Sync for TransactionManagerStatus
impl Unpin for TransactionManagerStatus
impl UnwindSafe for TransactionManagerStatus
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> 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, 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