pub enum OwnedTransactionSessionStatus {
Open,
LeaseActive,
Committable,
MustAbort,
Committed,
RolledBack,
Closed,
}Expand description
One-way lifecycle state for an owned transaction and its optional stream lease.
Variants§
Open
No stream lease is active; point operations and a final action are allowed.
LeaseActive
Exactly one lease owns iterator advancement. Commit and rollback are blocked.
Committable
A normally exhausted lease released the transaction for later commit or another lease.
MustAbort
An early close, cancellation, failure, or dropped lease requires rollback.
Committed
Commit completed exactly once.
RolledBack
Rollback completed exactly once.
Closed
A terminal action consumed the backend transaction but returned an error.
Implementations§
Source§impl OwnedTransactionSessionStatus
impl OwnedTransactionSessionStatus
Sourcepub const fn can_acquire_lease(self) -> bool
pub const fn can_acquire_lease(self) -> bool
Return whether a new lease may be started.
Sourcepub const fn can_commit(self) -> bool
pub const fn can_commit(self) -> bool
Return whether commit may consume the transaction.
Sourcepub const fn can_rollback(self) -> bool
pub const fn can_rollback(self) -> bool
Return whether rollback may consume the transaction.
Trait Implementations§
Source§impl Clone for OwnedTransactionSessionStatus
impl Clone for OwnedTransactionSessionStatus
Source§fn clone(&self) -> OwnedTransactionSessionStatus
fn clone(&self) -> OwnedTransactionSessionStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OwnedTransactionSessionStatus
impl Eq for OwnedTransactionSessionStatus
Source§impl From<OwnedLeaseOutcome> for OwnedTransactionSessionStatus
impl From<OwnedLeaseOutcome> for OwnedTransactionSessionStatus
Source§fn from(outcome: OwnedLeaseOutcome) -> Self
fn from(outcome: OwnedLeaseOutcome) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for OwnedTransactionSessionStatus
Auto Trait Implementations§
impl Freeze for OwnedTransactionSessionStatus
impl RefUnwindSafe for OwnedTransactionSessionStatus
impl Send for OwnedTransactionSessionStatus
impl Sync for OwnedTransactionSessionStatus
impl Unpin for OwnedTransactionSessionStatus
impl UnsafeUnpin for OwnedTransactionSessionStatus
impl UnwindSafe for OwnedTransactionSessionStatus
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