stronghold-stm 0.4.3

Software transactional memory
Documentation
// Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use thiserror::Error as DeriveError;

#[derive(Debug, DeriveError, PartialEq, Eq)]
pub enum TxError {
    #[error("Transaction failed")]
    Failed,

    #[error("TVar is locked")]
    LockPresent,

    #[error("Transactional version has overflown")]
    VersionOverflow,

    #[error("The Transaction is locked")]
    TransactionLocked,

    #[error("Object is stale")]
    StaleObject,

    #[error("Transactable Variable has wrong version")]
    VersionMismatch,

    #[error("Shared value has been casted as the wrong type")]
    SharedValueWrongTypeConversion,
}