pub enum TransactionManagerStatus {
    Valid(ValidTransactionManagerStatus),
    InError,
}
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
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§

Returns the transaction depth if the transaction manager’s status is valid, or returns Error::BrokenTransactionManager if the transaction manager is in error.

👎Deprecated: Removed without replacement

Whether we may be interested in calling set_top_level_transaction_requires_rollback_if_not_broken

You should typically not need this outside of a custom backend implementation

👎Deprecated: Use set_requires_rollback_maybe_up_to_top_level instead

If in transaction and transaction manager is not broken, registers that the connection can not be used anymore until top-level transaction is rolled back

Available on crate features i-implement-a-third-party-backend-and-opt-into-breaking-changes or postgres or mysql only.

If in transaction and transaction manager is not broken, registers that it’s possible that the connection can not be used anymore until top-level transaction is rolled back.

If that is registered, savepoints rollbacks will still be attempted, but failure to do so will not result in an error. (Some may succeed, some may not.)

Sets the transaction manager status to InError

Subsequent attempts to use transaction-related features will result in a Error::BrokenTransactionManager error

Trait Implementations§

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.