Enum aragog::transaction::TransactionOutput[][src]

#[must_use]pub enum TransactionOutput<T> {
    Committed(T),
    Aborted(ServiceError),
}

Output of a TransactionPool

Variants

Committed(T)

The transaction was committed

Aborted(ServiceError)

The transaction was aborted due to an error

Implementations

impl<T> TransactionOutput<T>[src]

pub fn is_committed(&self) -> bool[src]

Was the transaction committed

pub fn is_aborted(&self) -> bool[src]

Was the transaction aborted

pub fn unwrap(self) -> T[src]

Unwraps the output, returning the result

Panics

The method panics if the transaction was aborted

pub fn ok(self) -> Option<T>[src]

transform the output to a Option<T>

pub fn err(self) -> Option<ServiceError>[src]

transform the output to a Option<ServiceError>

Trait Implementations

impl<T> Into<Result<T, ServiceError>> for TransactionOutput<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for TransactionOutput<T>

impl<T> !Send for TransactionOutput<T>

impl<T> !Sync for TransactionOutput<T>

impl<T> Unpin for TransactionOutput<T> where
    T: Unpin

impl<T> !UnwindSafe for TransactionOutput<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.