Skip to main content

IntoTransactionResult

Trait IntoTransactionResult 

Source
pub trait IntoTransactionResult {
    type Output;

    // Required method
    fn into_transaction_result(self) -> TransactionResult<Self::Output>;
}
Expand description

Trait implemented by return types of closures passed to ChainLockTransaction::until_done.

The callable passed to ChainLockTransaction::until_done may return:

  1. TransactionResult<()> (a ()-returning transaction),
  2. TransactionResult<T> (a transaction returning user-defined type T), or
  3. DoneType (an infallible transaction with implied return type ()).

Required Associated Types§

Source

type Output

The terminal value type returned by until_done when the transaction completes.

Required Methods§

Source

fn into_transaction_result(self) -> TransactionResult<Self::Output>

Converts the closure return value into a TransactionResult.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§