pub enum TransactionResult<T = ()> {
Action(Action),
Value(T),
}Expand description
Result of a single execution of a transaction attempt closure passed to until_done.
Variants§
Action(Action)
The transaction must back off or restart and re-execute the closure.
Value(T)
The transaction completed with the terminal value T.
Implementations§
Source§impl TransactionResult<()>
impl TransactionResult<()>
Source§impl<T> TransactionResult<T>
impl<T> TransactionResult<T>
Sourcepub fn take_value(self) -> T
pub fn take_value(self) -> T
Trait Implementations§
Source§impl<T: Debug> Debug for TransactionResult<T>
impl<T: Debug> Debug for TransactionResult<T>
impl<T: Eq> Eq for TransactionResult<T>
Source§impl<T> From<Action> for TransactionResult<T>
impl<T> From<Action> for TransactionResult<T>
Source§impl From<DoneType> for TransactionResult<()>
impl From<DoneType> for TransactionResult<()>
Source§impl<T> IntoTransactionResult for TransactionResult<T>
impl<T> IntoTransactionResult for TransactionResult<T>
Source§type Output = T
type Output = T
The terminal value type returned by
until_done when the transaction completes.Source§fn into_transaction_result(self) -> TransactionResult<T>
fn into_transaction_result(self) -> TransactionResult<T>
Converts the closure return value into a
TransactionResult.Source§impl<T: PartialEq> PartialEq for TransactionResult<T>
impl<T: PartialEq> PartialEq for TransactionResult<T>
impl<T: PartialEq> StructuralPartialEq for TransactionResult<T>
Auto Trait Implementations§
impl<T> Freeze for TransactionResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for TransactionResult<T>where
T: RefUnwindSafe,
impl<T> Send for TransactionResult<T>where
T: Send,
impl<T> Sync for TransactionResult<T>where
T: Sync,
impl<T> Unpin for TransactionResult<T>where
T: Unpin,
impl<T> UnsafeUnpin for TransactionResult<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for TransactionResult<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more