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 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> 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::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
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>where
Conn: AsyncConnection + Send,
Self: ExecuteDsl<Conn> + 'query,
fn execute<'conn, 'query>( self, conn: &'conn mut Conn ) -> Conn::ExecuteFuture<'conn, 'query>where Conn: AsyncConnection + Send, Self: ExecuteDsl<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>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> LoadFuture<'conn, 'query, Self, Conn, U>where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,
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>where
U: Send + 'conn,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> GetResult<'conn, 'query, Self, Conn, U>where U: Send + 'conn, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,
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>where
U: Send,
Conn: AsyncConnection,
Self: LoadQuery<'query, Conn, U> + 'query,
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> LoadFuture<'conn, 'query, Self, Conn, U>where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,
Runs the command, returning an
Vec
with the affected rows. Read more